Smile-SA/elasticsuite

View on GitHub

Showing 607 of 1,357 total issues

Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $field,
        $direction,
        $nestedPath,
        QueryInterface $nestedFilter = null,
        $scoreMode = self::SCORE_MODE_MIN,
Severity: Major
Found in src/module-elasticsuite-core/Search/Request/SortOrder/Nested.php - About 50 mins to fix

    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            Reader $reader,
            CacheInterface $cache,
            MappingFactory $mappingFactory,
            MappingFieldFactory $mappingFieldFactory,
            DataSourceResolverFactory $dataSourceResolverFactory,
    Severity: Major
    Found in src/module-elasticsuite-core/Index/Indices/Config.php - About 50 mins to fix

      Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $scriptType,
              $lang,
              $source,
              $params = [],
              $direction = self::SORT_ASC,
      Severity: Major
      Found in src/module-elasticsuite-core/Search/Request/SortOrder/Script.php - About 50 mins to fix

        Method aroundCreate has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                QueryBuilder $subject,
                \Closure $proceed,
                ContainerConfigurationInterface $containerConfig,
                $queryText,
                $spellingType,
        Severity: Major
        Found in src/module-elasticsuite-thesaurus/Plugin/QueryRewrite.php - About 50 mins to fix

          Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
          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,
          Severity: Major
          Found in src/module-elasticsuite-tracker/Block/Variables/Page/Catalog.php - About 50 mins to fix

            Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
            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

                      CategoryAttributeQuery $categoryAttributeQuery,
                      CategoryAttributesMapper $categoryAttributesMapper,
                      RootCategoryProvider $rootCategoryProvider,
                      LayerFormatter $layerFormatter,
                      ResourceConnection $resourceConnection,

                Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
                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,
                Severity: Major
                Found in src/module-elasticsuite-tracker/Model/IndexManager.php - About 50 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                            if (i < json.length - 1) {
                              html += ',';
                            }

                    Avoid deeply nested control flow statements.
                    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

                                if (isCollapsable(json[i])) {
                                  html += '<a href class="json-toggle"></a>';
                                }

                        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                Context $context,
                                PageFactory $resultPageFactory,
                                Registry $coreRegistry,
                                OptimizerRepositoryInterface $optimizerRepository,
                                OptimizerInterfaceFactory $optimizerFactory,

                          Method aroundCreateQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  QueryBuilder $subject,
                                  \Closure $proceed,
                                  ContainerConfigurationInterface $containerConfiguration,
                                  $queryText,
                                  array $filters,
                          Severity: Minor
                          Found in src/module-elasticsuite-catalog-optimizer/Plugin/QueryRewrite.php - About 45 mins to fix

                            Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    RequestFactory $requestFactory,
                                    QueryBuilder $queryBuilder,
                                    QueryFactory $queryFactory,
                                    CategoryQuery $categoryQuery,
                                    SearchQuery $searchQuery,

                              Function renderText has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  function renderText(ctx, text, x, y, font, opts = {}) {
                              Severity: Minor
                              Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 45 mins to fix

                                Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        ResourceConnection $resource,
                                        StoreManagerInterface $storeManager,
                                        MetadataPool $metadataPool,
                                        ProductType $catalogProductType,
                                        Config $eavConfig,

                                  Method modifyAggregations has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          $storeId,
                                          $requestName,
                                          $aggregations,
                                          $query,
                                          $filters,

                                    Function getActiveFilters has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function getActiveFilters()
                                        {
                                            $activeFilters = [];
                                    
                                            if (!$this->isInline()) {
                                    Severity: Minor
                                    Found in src/module-elasticsuite-catalog/Block/Navigation.php - About 45 mins to fix

                                    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

                                            ResourceModel $resourceModel,
                                            FieldFactory $fieldFactory,
                                            AttributeHelper $attributeHelper,
                                            array $indexedBackendModels = [],
                                            array $forbiddenChildrenAttributes = [],

                                      Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              JsonHelper $jsonHelper,
                                              ImportHelper $importExportData,
                                              Data $importData,
                                              Config $eavConfig,
                                              Helper $resourceHelper,
                                      Severity: Minor
                                      Found in src/module-elasticsuite-catalog/Model/Import/ProductAttribute.php - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language