Showing 607 of 1,357 total issues
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$field,
$direction,
$nestedPath,
QueryInterface $nestedFilter = null,
$scoreMode = self::SCORE_MODE_MIN,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Reader $reader,
CacheInterface $cache,
MappingFactory $mappingFactory,
MappingFieldFactory $mappingFieldFactory,
DataSourceResolverFactory $dataSourceResolverFactory,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$scriptType,
$lang,
$source,
$params = [],
$direction = self::SORT_ASC,
Method aroundCreate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
QueryBuilder $subject,
\Closure $proceed,
ContainerConfigurationInterface $containerConfig,
$queryText,
$spellingType,
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,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Search\Model\SearchEngine $searchEngine,
\Smile\ElasticsuiteCore\Search\Request\Builder $searchRequestBuilder,
\Smile\ElasticsuiteAnalytics\Model\Report\Context $context,
\Smile\ElasticsuiteCore\Search\Request\Aggregation\AggregationFactory $aggregationFactory,
\Smile\ElasticsuiteCore\Search\Request\Query\QueryFactory $queryFactory,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
CategoryAttributeQuery $categoryAttributeQuery,
CategoryAttributesMapper $categoryAttributesMapper,
RootCategoryProvider $rootCategoryProvider,
LayerFormatter $layerFormatter,
ResourceConnection $resourceConnection,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Smile\ElasticsuiteCore\Api\Index\IndexSettingsInterface $indexSettings,
\Smile\ElasticsuiteCore\Api\Client\ClientInterface $client,
\Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexOperation,
\Smile\ElasticsuiteTracker\Model\EventIndex\DateBounds $dateBounds,
Avoid deeply nested control flow statements. Open
Open
if (i < json.length - 1) {
html += ',';
}
Avoid deeply nested control flow statements. Open
Open
for (var key in json) {
if (Object.prototype.hasOwnProperty.call(json, key)) {
html += '<li>';
var keyRepr = options.withQuotes ?
'<span class="json-string">"' + key + '"</span>' : key;
Avoid deeply nested control flow statements. Open
Open
if (isCollapsable(json[i])) {
html += '<a href class="json-toggle"></a>';
}
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Context $context,
PageFactory $resultPageFactory,
Registry $coreRegistry,
OptimizerRepositoryInterface $optimizerRepository,
OptimizerInterfaceFactory $optimizerFactory,
Method aroundCreateQuery
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
QueryBuilder $subject,
\Closure $proceed,
ContainerConfigurationInterface $containerConfiguration,
$queryText,
array $filters,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
RequestFactory $requestFactory,
QueryBuilder $queryBuilder,
QueryFactory $queryFactory,
CategoryQuery $categoryQuery,
SearchQuery $searchQuery,
Function renderText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function renderText(ctx, text, x, y, font, opts = {}) {
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ResourceConnection $resource,
StoreManagerInterface $storeManager,
MetadataPool $metadataPool,
ProductType $catalogProductType,
Config $eavConfig,
Method modifyAggregations
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$storeId,
$requestName,
$aggregations,
$query,
$filters,
Function getActiveFilters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getActiveFilters()
{
$activeFilters = [];
if (!$this->isInline()) {
- 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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ResourceModel $resourceModel,
FieldFactory $fieldFactory,
AttributeHelper $attributeHelper,
array $indexedBackendModels = [],
array $forbiddenChildrenAttributes = [],
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
JsonHelper $jsonHelper,
ImportHelper $importExportData,
Data $importData,
Config $eavConfig,
Helper $resourceHelper,