Showing 620 of 1,375 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Template\Context $context,
Data $jsonHelper,
TrackerHelper $trackerHelper,
Registry $registry,
array $data = []
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Backend\Block\Template\Context $context,
\Smile\ElasticsuiteAnalytics\Model\Report\Context $reportContext,
\Smile\ElasticsuiteTracker\Model\IndexManager $indexManager,
\Magento\Framework\Serialize\Serializer\Json $jsonSerializer,
array $data = []
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Smile\ElasticsuiteCore\Search\Request\Aggregation\AggregationFactory $aggregationFactory,
\Smile\ElasticsuiteCore\Search\Request\Aggregation\MetricFactory $metricFactory,
\Smile\ElasticsuiteCore\Search\Request\Aggregation\PipelineFactory $pipelineFactory,
\Smile\ElasticsuiteCore\Search\Request\Query\QueryFactory $queryFactory,
\Smile\ElasticsuiteAnalytics\Helper\Data $helper
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Backend\App\Action\Context $context,
PageFactory $resultPageFactory,
\Magento\Framework\Registry $coreRegistry,
ThesaurusRepositoryInterface $thesaurusRepository,
ThesaurusFactory $thesaurusFactory
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Backend\Block\Context $context,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\Framework\Registry $registry,
ReadHandler $readHandler,
array $data = []
Method resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
FileResolverInterface $fileResolver,
ConverterInterface $converter,
SchemaLocator $schemaLocator,
DomFactory $domFactory,
$fileName = self::FILE_NAME
Method resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Smile\ElasticsuiteCore\Search\Request\Builder $searchRequestBuilder,
Context $context,
array $aggregationProviders = [],
array $queryProviders = [],
$containerName = 'tracking_log_event'
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\Smile\ElasticsuiteTracker\Helper\Data $trackerHelper,
\Magento\Framework\Registry $registry,
array $data = []
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
DataCheckResultFactory $checkResultFactory,
Builder $searchRequestBuilder,
QueryFactory $queryFactory,
SearchEngineInterface $searchEngine,
?DataFixerInterface $dataFixer = null
Method aroundLoad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function aroundLoad(FlatResource $categoryResource, \Closure $proceed, $category, $value, $field = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Data $catalogSearchHelper,
CustomerTrackingServiceInterface $service,
CookieManagerInterface $cookieManager,
TrackerHelper $trackerHelper,
PageTypeConfig $pageTypeConfig
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Context $layerContext,
Resolver $layerResolver,
FilterableAttributesListFactory $filterableAttributesListFactory,
FilterListFactory $filterListFactory,
$filtersList = []
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ActionFactory $actionFactory,
ManagerInterface $eventManager,
StoreManagerInterface $storeManager,
Url $urlModel,
VirtualCategoryRoot $virtualCategoryRoot
Method resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Field $field,
$context,
ResolveInfo $info,
array $value = null,
array $args = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
FullIndexer $fullIndexer,
\Smile\ElasticsuiteVirtualCategory\Model\ResourceModel\Category\Product\Position $saveHandler,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\Magento\Framework\Message\ManagerInterface $messageManager
Method combineSynonyms
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function combineSynonyms($queryText, $synonymByPositions, $maxRewrites, $substitutions = 0, $offset = 0)
Function updateSearchContext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
private function updateSearchContext($storeId, $category, $queryText)
{
$this->searchContext->setStoreId($storeId);
if ((string) $queryText !== '') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getSearchQuery
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getSearchQuery()
{
$queryParams = [];
$aggregator = $this->getAggregator();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"