Skip to content

Commit c086ab2

Browse files
committed
fix phpcs fix
1 parent 9775528 commit c086ab2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

app/code/Magento/Catalog/Block/Rss/Category.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
5252
* @var CategoryRepositoryInterface
5353
*/
5454
protected $categoryRepository;
55-
5655
/**
5756
* @param \Magento\Framework\View\Element\Template\Context $context
5857
* @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
@@ -122,8 +121,9 @@ public function getRssData()
122121
$newUrl = $category->getUrl();
123122
$title = $category->getName();
124123
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];
125-
126-
$attributes = $this->_viewConfig->getViewConfig()->getMediaAttributes('Magento_Catalog', $this->imageHelper::MEDIA_TYPE_CONFIG_NODE, 'rss_thumbnail');
124+
$attributes = $this->_viewConfig
125+
->getViewConfig()
126+
->getMediaAttributes('Magento_Catalog', $this->imageHelper::MEDIA_TYPE_CONFIG_NODE, 'rss_thumbnail');
127127
/** @var $product \Magento\Catalog\Model\Product */
128128
foreach ($this->rssModel->getProductCollection($category, $this->getStoreId()) as $product) {
129129
$product->setAllowedInRss(true);
@@ -281,5 +281,18 @@ public function getFeeds()
281281
public function isAuthRequired()
282282
{
283283
return false;
284+
}
285+
286+
/**
287+
* Retrieve config view
288+
*
289+
* @return \Magento\Framework\Config\View
290+
*/
291+
private function getConfigView()
292+
{
293+
if (!$this->configView) {
294+
$this->configView = $this->_viewConfig->getViewConfig();
295+
}
296+
return $this->configView;
284297
}
285298
}

0 commit comments

Comments
 (0)