Smile-SA/elasticsuite

View on GitHub

Showing 1,375 of 1,375 total issues

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,

      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

                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

                  $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/Indices/Config/Reader.php - About 1 hr to fix

              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

                        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,

                    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

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                              private function getPageTypeLabelMap()
                              {
                                  $labelByIdentifier = [];
                          
                                  $pageTypes = $this->pageTypeConfig->getPageTypes();
                          src/module-elasticsuite-tracker/Block/Variables/Page/Base.php on lines 158..168

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 50.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                              private function getPageTypeLabelMap()
                              {
                                  $labelByIdentifier = [];
                          
                                  $pageTypes = $this->pageTypeConfig->getPageTypes();
                          src/module-elasticsuite-tracker/Observer/TrackRedirectIfOneResult.php on lines 170..180

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 50.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              public function getProductBlacklistByCategory($category)
                              {
                                  $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
                                  if (is_object($category)) {
                                      if ($category->getUseStorePositions()) {
                          src/module-elasticsuite-virtual-category/Model/ResourceModel/Category/Product/Position.php on lines 78..89

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if ($applyTo) {
                                      $containerData = ['apply_to' => (int) true];
                                      $queryIds      = $this->resource->getQueryIdsByOptimizer($entity);
                          
                                      if (!empty($queryIds)) {
                          src/module-elasticsuite-catalog-optimizer/Model/Optimizer/Limitation/ReadHandler.php on lines 69..76

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if ($applyTo) {
                                      $containerData = ['apply_to' => (int) true];
                                      $categoryIds   = $this->resource->getCategoryIdsByOptimizer($entity);
                                      if (!empty($categoryIds)) {
                                          $containerData['category_ids'] = $categoryIds;
                          src/module-elasticsuite-catalog-optimizer/Model/Optimizer/Limitation/ReadHandler.php on lines 91..99

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              public function getProductPositionsByCategory($category)
                              {
                                  $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
                                  if (is_object($category)) {
                                      if ($category->getUseStorePositions()) {
                          src/module-elasticsuite-virtual-category/Model/ResourceModel/Category/Product/Position.php on lines 98..109

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  $select->where('p.product_id IN(?)', $productIds)
                                      ->where('cpi.product_id IS NULL')
                                      ->where('p.store_id = 0')
                                      ->columns(
                                          [
                          src/module-elasticsuite-virtual-category/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/CategoryData.php on lines 177..189

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 49.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  $select->where('p.product_id IN(?)', $productIds)
                                      ->where('cpi.product_id IS NULL')
                                      ->where('p.store_id = ?', (int) $storeId)
                                      ->columns(
                                          [
                          src/module-elasticsuite-virtual-category/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/CategoryData.php on lines 141..153

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 49.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language