Smile-SA/elasticsuite

View on GitHub

Showing 620 of 1,375 total issues

Function createChart has 41 lines of code (exceeds 40 allowed). Consider refactoring.
Open

        createChart: function (optionValue = null) {
            if (!this.chartRangesInit) {
                this.initRanges();
            }
            optionValue = typeof optionValue === 'object' ? null : optionValue;

    Function updateElements has 41 lines of code (exceeds 40 allowed). Consider refactoring.
    Open

            updateElements(arcs, start, count, mode) {
                const me = this;
                const reset = mode === 'reset';
                const chart = me.chart;
                const dataset = me.getDataset();
    Severity: Minor
    Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 1 hr to fix

      Function pathArc has 41 lines of code (exceeds 40 allowed). Consider refactoring.
      Open

          function pathArc(ctx, element, offset, end) {
              const {x, y, startAngle: start, pixelMargin, innerRadius: innerR} = element;
              const outerRadius = Math.max(element.outerRadius + offset - pixelMargin, 0);
              const innerRadius = innerR > 0 ? innerR + offset + pixelMargin : 0;
              const alpha = end - start;
      Severity: Minor
      Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 1 hr to fix

        Function getCaretPosition has 41 lines of code (exceeds 40 allowed). Consider refactoring.
        Open

                getCaretPosition(tooltipPoint, size, options) {
                    const {xAlign, yAlign} = this;
                    const {cornerRadius, caretSize} = options;
                    const {x: ptX, y: ptY} = tooltipPoint;
                    const {width, height} = size;
        Severity: Minor
        Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 1 hr to fix

          Function fit has 41 lines of code (exceeds 40 allowed). Consider refactoring.
          Open

                  fit() {
                      const me = this;
                      const minSize = {
                          width: 0,
                          height: 0
          Severity: Minor
          Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 1 hr to fix

            Method getChartData has 41 lines of code (exceeds 40 allowed). Consider refactoring.
            Open

                public function getChartData()
                {
                    $data = [
                        'cols' => [
                            ['type' => 'string', 'label' => __('Session type')],

              Method getQueries has 41 lines of code (exceeds 40 allowed). Consider refactoring.
              Open

                  private function getQueries()
                  {
                      $queries = [
                          'all'      => $this->queryFactory->create(
                              QueryInterface::TYPE_BOOL,

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

                        \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,
                        \Magento\Framework\Filter\StripTags $tagFilter,
                Severity: Major
                Found in src/module-elasticsuite-catalog/Model/Layer/Filter/Attribute.php - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if (($this->getAttribute()->getSourceModel() == 'Magento\Eav\Model\Entity\Attribute\Source\Boolean')
                              || ($this->getAttribute()->getBackendType() == 'int')
                              || ($this->getAttribute()->getFrontendClass() == 'validate-digits')
                              || ($this->getAttribute()->getBackendType() == 'decimal' || $this->getAttribute()->getFrontendClass() == 'validate-number')
                              || (in_array($this->getAttribute()->getFrontendInput(), ['select', 'multiselect'])

                    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

                              \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,
                                $primaryFieldName,
                                $requestFieldName,
                                $collectionFactory,
                                array $addFieldStrategies = [],

                          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

                                    $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 = [],
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language