Showing 607 of 1,357 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. 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
Context $layerContext,
Resolver $layerResolver,
FilterableAttributesListFactory $filterableAttributesListFactory,
FilterListFactory $filterListFactory,
$filtersList = []
Method combineSynonyms
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function combineSynonyms($queryText, $synonymByPositions, $maxRewrites, $substitutions = 0, $offset = 0)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Smile\ElasticsuiteTracker\Api\CustomerTrackingServiceInterface $service,
\Magento\Framework\Stdlib\CookieManagerInterface $cookieManager,
\Smile\ElasticsuiteTracker\Helper\Data $trackerHelper,
\Magento\Framework\View\Layout\PageType\Config $pageTypeConfig,
\Psr\Log\LoggerInterface $logger
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
DataCheckResultFactory $checkResultFactory,
Builder $searchRequestBuilder,
QueryFactory $queryFactory,
SearchEngineInterface $searchEngine,
?DataFixerInterface $dataFixer = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
LayerFormatter $layerFormatter,
AttributeRepository $attributeRepository,
LayeredNavAttributesProvider $layeredNavAttributesProvider,
$hideNoValueAttributes = [],
$bucketNameFilter = []
Method resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
Function updateSearchContext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. 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 prepareAdaptiveIntervals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function prepareAdaptiveIntervals(): array
{
$adaptiveIntervals = [];
$intervals = $this->getIntervals();
- 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 getElasticSuiteIndices
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getElasticSuiteIndices(): ?array
{
if ($this->indexStatsProvider->getElasticSuiteIndices() !== null) {
$elasticSuiteIndices = $this->indexStatsProvider->getElasticSuiteIndices();
$excludedIndexStatus = [
- 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 getList
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getList()
{
if (null === $this->attributeList) {
$cacheKey = self::CACHE_KEY;
$attributesList = $this->cache->load($cacheKey);
- 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 loadArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function loadArray($arr, $key = 'conditions')
{
$aggregator = $this->getAggregatorFromArray($arr);
$value = $this->getValueFromArray($arr);
- 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
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"
Further reading
Function loadChildrens
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function loadChildrens($productIds, $storeId)
{
$children = [];
foreach ($this->catalogProductType->getCompositeTypes() as $productTypeId) {
- 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 afterGetSortOrders
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function afterGetSortOrders(
RequestMapper $subject,
$result,
ContainerConfigurationInterface $containerConfiguration,
SearchCriteriaInterface $searchCriteria
- 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 canIndexAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function canIndexAttribute(AttributeInterface $attribute)
{
// 'price' attribute is declared as nested field into the indices file.
$canIndex = $attribute->getBackendType() != 'static' && $attribute->getAttributeCode() !== 'price';
- 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 getValueElementType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getValueElementType()
{
$valueElementType = 'text';
if ($this->getAttribute() == 'attribute_set_id') {
- 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
public function getSearchQuery(ProductCondition $condition)
{
// Retrieve the operator and days from the condition.
$operator = $condition->getOperator();
$value = (int) $condition->getValue();
- 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 _prepareValueOptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function _prepareValueOptions()
{
$selectReady = $this->getData('value_select_options');
$hashedReady = $this->getData('value_option');
- 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 getAggregationData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getAggregationData(\Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute)
{
$type = $attribute->getBackendType();
$aggregation = isset($this->aggregations[$type]) ? $this->aggregations[$type] : $this->defaultAggregation;
- 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"