Smile-SA/elasticsuite

View on GitHub

Showing 607 of 1,357 total issues

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

        AttributeCollectionFactory $attributeCollectionFactory,
        StoreManagerInterface $storeManager,
        IndexOperationInterface $indexManager,
        MappingHelper $mappingHelper,
        RequestFieldMapper $requestFieldMapper,

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

            $name,
            $primaryFieldName,
            $requestFieldName,
            $collectionFactory,
            array $addFieldStrategies = [],

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

              \Magento\Customer\Model\Session $customerSession,
              \Magento\Store\Model\StoreManagerInterface $storeManager,
              \Smile\ElasticsuiteCore\Helper\Mapping $mappingHelper,
              \Smile\ElasticsuiteCore\Api\Search\ContextInterface $searchContext,
              \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository,

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

                $name,
                array $queries,
                array $metrics = [],
                array $childBuckets = [],
                array $pipelines = [],

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

                  FileResolverInterface $fileResolver,
                  Converter $converter,
                  SchemaLocator $schemaLocator,
                  ValidationStateInterface $validationState,
                  $fileName = self::FILENAME,

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

                    $name,
                    $field,
                    array $metrics = [],
                    array $childBuckets = [],
                    array $pipelines = [],

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

                      FileResolverInterface $fileResolver,
                      Converter $converter,
                      SchemaLocator $schemaLocator,
                      ValidationStateInterface $validationState,
                      $fileName = self::FILENAME,
              Severity: Major
              Found in src/module-elasticsuite-core/Index/Indices/Config/Reader.php - About 1 hr to fix

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

                        $name,
                        $primaryFieldName,
                        $requestFieldName,
                        $collectionFactory,
                        array $addFieldStrategies = [],

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

                          FileResolverInterface $fileResolver,
                          Converter $converter,
                          SchemaLocator $schemaLocator,
                          ValidationStateInterface $validationState,
                          $fileName = self::FILENAME,
                  Severity: Major
                  Found in src/module-elasticsuite-core/Index/Analysis/Config/Reader.php - About 1 hr to fix

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

                            EntityFactory $entityFactory,
                            LoggerInterface $logger,
                            FetchStrategyInterface $fetchStrategy,
                            ManagerInterface $eventManager,
                            Data $resource,

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

                              StoreManagerInterface $storeManager,
                              Manager $moduleManager,
                              BackendFactory $backendFactory,
                              SourceFactory $sourceFactory,
                              CommentFactory $commentFactory,

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

                                Context $context,
                                PageFactory $resultPageFactory,
                                Registry $coreRegistry,
                                ThesaurusRepositoryInterface $thesaurusRepository,
                                ThesaurusFactory $thesaurusFactory,

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

                                  \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
                                  \Psr\Log\LoggerInterface $logger,
                                  \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
                                  \Magento\Framework\Event\ManagerInterface $eventManager,
                                  \Magento\Store\Model\StoreManagerInterface $storeManager,

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

                                    Template\Context $context,
                                    Data $jsonHelper,
                                    TrackerHelper $trackerHelper,
                                    Registry $registry,
                                    PageTypeConfig $pageTypeConfig,
                            Severity: Major
                            Found in src/module-elasticsuite-tracker/Block/Variables/Page/Base.php - About 1 hr to fix

                              Method __construct has 8 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/Search.php - About 1 hr to fix

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

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

                                  Function canApply has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private function canApply() : bool
                                      {
                                          if (empty($this->optimizer->getSearchContainer())) {
                                              return false;
                                          }
                                  Severity: Minor
                                  Found in src/module-elasticsuite-catalog-optimizer/Model/Optimizer/Preview.php - About 55 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

                                  Function getNumberOfGhostIndices has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private function getNumberOfGhostIndices()
                                      {
                                          if ($this->indexStatsProvider->getElasticSuiteIndices() !== null) {
                                              $elasticsuiteIndices = $this->indexStatsProvider->getElasticSuiteIndices();
                                              $ghostIndices = [];

                                  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 afterGetFilters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function afterGetFilters(
                                          RequestMapper $subject,
                                          $result,
                                          ContainerConfigurationInterface $containerConfiguration,
                                          SearchCriteriaInterface $searchCriteria
                                  Severity: Minor
                                  Found in src/module-elasticsuite-catalog/Plugin/Search/RequestMapperPlugin.php - About 55 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

                                  Function getElasticsuiteIndexMaxSize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private function getElasticsuiteIndexMaxSize()
                                      {
                                          if ($this->indexStatsProvider->getElasticSuiteIndices() !== null) {
                                              $elasticsuiteIndices = $this->indexStatsProvider->getElasticSuiteIndices();
                                              $indexSizes = [];

                                  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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language