Smile-SA/elasticsuite

View on GitHub

Showing 1,375 of 1,375 total issues

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

    public function __construct(
        \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository,
        \Smile\ElasticsuiteVirtualCategory\Model\Category\Filter\Provider $filterProvider,
        QueryFactory $queryFactory,
        Uid $uidEncoder
src/module-elasticsuite-virtual-category/Helper/Rule.php on lines 58..68

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 68.

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 __construct(
        \Magento\Framework\App\CacheInterface $cache,
        \Magento\Customer\Model\Session $customerSession,
        ReadHandler $readHandler,
        CategoryRepositoryInterfaceFactory $categoryRepository
Severity: Minor
Found in src/module-elasticsuite-virtual-category/Helper/Rule.php and 1 other location - About 55 mins to fix
src/module-elasticsuite-virtual-category/Plugin/Search/RequestMapperPlugin.php on lines 69..79

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 68.

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 __construct(
        \Magento\Framework\Data\Collection\EntityFactory $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
src/module-elasticsuite-virtual-category/Model/Layer/Filter/Category.php on lines 67..100

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 68.

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 __construct(
        AttributeList $attributeList,
        QueryFactory $queryFactory,
        SpecialAttributesProvider $specialAttributesProvider,
        $nestedFilters = []
src/module-elasticsuite-catalog-optimizer/Model/Optimizer/ApplierList.php on lines 59..69

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 68.

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 __construct(
        \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Catalog\Model\Layer $layer,
        \Magento\Catalog\Model\Layer\Filter\Item\DataBuilder $itemDataBuilder,
src/module-elasticsuite-catalog/Model/ResourceModel/Category/Fulltext/Collection.php on lines 96..129

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 68.

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 getCurrentVisitorId()
    {
        $visitorId = null;

        $cookieConfig = $this->getCookieConfig();
Severity: Minor
Found in src/module-elasticsuite-tracker/Helper/Data.php and 1 other location - About 55 mins to fix
src/module-elasticsuite-tracker/Helper/Data.php on lines 275..286

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 68.

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 __construct(
        QueryFactory $queryFactory,
        ProviderInterface $functionsProvider,
        ScopeConfigInterface $scopeConfig,
        array $filters = []
src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/QueryBuilder.php on lines 58..68

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 68.

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

Method __construct has 7 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\Framework\Stdlib\DateTime\DateTime $date,

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

            ContextInterface $context,
            UiComponentFactory $uiComponentFactory,
            UrlInterface $urlBuilder,
            array $components = [],
            array $data = [],

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

              \Smile\ElasticsuiteCore\Index\Indices\Config $indicesConfig,
              IndexerRegistry $indexerRegistry,
              StoreManagerInterface $storeManager,
              IndexOperationInterface $indexOperation,
              AttributeHelper $attributeHelper,
      Severity: Major
      Found in src/module-elasticsuite-catalog/Plugin/Catalog/Eav/AttributePlugin.php - About 50 mins to fix

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

                \Magento\Framework\View\Element\Template\Context $context,
                \Magento\Catalog\Model\Layer\Resolver $layerResolver,
                \Magento\Catalog\Model\Layer\FilterList $filterList,
                \Magento\Catalog\Model\Layer\AvailabilityFlagInterface $visibilityFlag,
                \Magento\Framework\ObjectManagerInterface $objectManager,
        Severity: Major
        Found in src/module-elasticsuite-catalog/Block/Navigation.php - About 50 mins to fix

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

                  $name,
                  $primaryFieldName,
                  $requestFieldName,
                  OptimizerCollectionFactory $optimizerCollectionFactory,
                  PoolInterface $modifierPool,

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

                    \Magento\Framework\Model\Context $context,
                    \Magento\Framework\Registry $registry,
                    \Magento\Framework\Data\FormFactory $formFactory,
                    \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
                    \Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\CombineFactory $conditionsFactory,
            Severity: Major
            Found in src/module-elasticsuite-catalog-rule/Model/Rule.php - About 50 mins to fix

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

                      Resolver $layerResolver,
                      ScopeConfigInterface $scopeConfig,
                      Data $catalogSearchHelper,
                      ManagerInterface $messageManager,
                      ResultFactory $resultFactory,
              Severity: Major
              Found in src/module-elasticsuite-catalog/Plugin/CatalogSearch/ResultPlugin.php - About 50 mins to fix

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

                        ProductCollectionFactory $collectionFactory,
                        ItemDataFactory $itemFactory,
                        QueryFactory $queryFactory,
                        $storeId,
                        $size = 10,
                Severity: Major
                Found in src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php - About 50 mins to fix

                  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

                            $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 __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

                                IndexOperationInterface $indexOperation,
                                CacheHelper $cacheHelper,
                                Batch $batch,
                                DataSourceResolverInterfaceFactory $dataSourceResolverFactory,
                                IndexSettingsInterface $indexSettings,
                        Severity: Major
                        Found in src/module-elasticsuite-core/Indexer/GenericIndexerHandler.php - About 50 mins to fix

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

                                  array $must = [],
                                  array $should = [],
                                  array $mustNot = [],
                                  $minimumShouldMatch = 1,
                                  $name = null,
                          Severity: Major
                          Found in src/module-elasticsuite-core/Search/Request/Query/Boolean.php - About 50 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language