src/module-elasticsuite-tracker/Block/Variables/Page/Catalog.php
Showing 6 of 6 total issues
Function getLayerVariables
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
private function getLayerVariables() { $variables = []; $layer = $this->catalogLayer;
- Read upRead up
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Template\Context $context, \Magento\Framework\Json\Helper\Data $jsonHelper, \Smile\ElasticsuiteTracker\Helper\Data $trackerHelper, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\Layer\Resolver $layerResolver,
Possibly zero references to use statement for classlike/namespace Navigation
(\Smile\ElasticsuiteCatalog\Block\Navigation)
Open
Open
use Smile\ElasticsuiteCatalog\Block\Navigation;
- Exclude checks
Returning type null
but getProductListBlock()
is declared to return \Magento\Framework\View\Element\BlockInterface
Open
Open
return is_object($productListBlock) ? $productListBlock : null;
- Exclude checks
Argument 1 (categoryId)
is string
but \Smile\ElasticsuiteTracker\Block\Variables\Page\Catalog::getCategoryNameById()
takes int
defined at /code/src/module-elasticsuite-tracker/Block/Variables/Page/Catalog.php:233
Open
Open
$breadcrumb[] = html_entity_decode($this->getCategoryNameById($categoryId, $category->getStoreId()));
- Exclude checks
Possibly zero references to use statement for classlike/namespace Category
(\Magento\Catalog\Model\Category)
Open
Open
use Magento\Catalog\Model\Category;
- Exclude checks