Smile-SA/elasticsuite

View on GitHub

Showing 1,441 of 1,441 total issues

File chart.js has 12846 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
* Chart.js v3.3.2
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
Severity: Major
Found in src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js - About 1 mo to fix

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

    <?php
    /**
    * DISCLAIMER
    *
    * Do not edit or add to this file if you wish to upgrade to newer versions in the future.
    Severity: Major
    Found in src/module-elasticsuite-tracker/Console/FixData.php and 1 other location - About 1 day to fix
    src/module-elasticsuite-tracker/Console/CheckData.php on lines 1..100

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

    <?php
    /**
    * DISCLAIMER
    *
    * Do not edit or add to this file if you wish to upgrade to newer versions in the future.
    Severity: Major
    Found in src/module-elasticsuite-tracker/Console/CheckData.php and 1 other location - About 1 day to fix
    src/module-elasticsuite-tracker/Console/FixData.php on lines 1..101

    Function smileTracker has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
    Open

    const smileTracker = (function () {
     
    "use strict";
     
    const guid = (function() {
    Severity: Minor
    Found in src/module-elasticsuite-tracker/view/frontend/web/js/tracking.js - About 1 day to fix

    Function smileTracker has 279 lines of code (exceeds 40 allowed). Consider refactoring.
    Open

    const smileTracker = (function () {
     
    "use strict";
     
    const guid = (function() {
    Severity: Major
    Found in src/module-elasticsuite-tracker/view/frontend/web/js/tracking.js - About 1 day to fix

      Function afterCreateCollection has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
      Open

      public function afterCreateCollection(ProductsList $subject, $collection)
      {
      $storeId = $this->getCurrentStoreId($subject);
      $sortOption = $subject->getData('sort_order');
      $conditionOption = $subject->getData('condition_option');

      File slider.js has 568 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
      * jQuery UI Slider - v1.10.4
      * http://jqueryui.com
      *
      * Copyright 2014 jQuery Foundation and other contributors
      Severity: Major
      Found in src/module-elasticsuite-catalog/view/frontend/web/js/slider.js - About 1 day to fix

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

        legend: {
        labels: {
        generateLabels(chart) {
        const data = chart.data;
        if (data.labels.length && data.datasets.length) {
        src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js on lines 8021..8046

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

        legend: {
        labels: {
        generateLabels(chart) {
        const data = chart.data;
        if (data.labels.length && data.datasets.length) {
        src/module-elasticsuite-core/view/adminhtml/web/js/lib/chart.js on lines 8325..8350

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

        <?php
        /**
        * DISCLAIMER
        *
        * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDelete.php on lines 1..62
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassEnable.php on lines 1..62

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

        <?php
        /**
        * DISCLAIMER
        *
        * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDelete.php on lines 1..62
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDisable.php on lines 1..62

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

        <?php
        /**
        * DISCLAIMER
        *
        * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDisable.php on lines 1..62
        src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassEnable.php on lines 1..62

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

        <?php
        /**
        * DISCLAIMER
        *
        * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
        src/module-elasticsuite-indices/Controller/Adminhtml/Index/Settings.php on lines 1..88

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

        <?php
        /**
        * DISCLAIMER
        * Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer
        * versions in the future.
        src/module-elasticsuite-indices/Controller/Adminhtml/Index/Mapping.php on lines 1..88

        Function extractTermStatsByPosition has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

        private function extractTermStatsByPosition($termVectors, $useAllTokens = false)
        {
        $statByPosition = [];
        $analyzers = [
        FieldInterface::ANALYZER_STANDARD,

        File FrontPlugin.php has 452 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
        * DISCLAIMER
        *
        * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer

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

          else if (!this._getLastElement().hasClass(this.options.selectClass)) {
          var nextElement = this._getNextElement();
          this.responseList.selected.removeClass(this.options.selectClass);
          this.responseList.selected = nextElement.addClass(this.options.selectClass);
          } else {
          src/module-elasticsuite-core/view/frontend/web/js/form-mini.js on lines 408..416

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

          if (!this._getFirstVisibleElement().hasClass(this.options.selectClass)) {
          var prevElement = this._getPrevElement();
          this.responseList.selected.removeClass(this.options.selectClass);
          this.responseList.selected = prevElement.addClass(this.options.selectClass);
          } else {
          src/module-elasticsuite-core/view/frontend/web/js/form-mini.js on lines 388..396

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

          <?php
          /**
          * DISCLAIMER
          *
          * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
          src/module-elasticsuite-core/Search/Request/Query/Span/SpanNot.php on lines 1..119
          src/module-elasticsuite-core/Search/Request/Query/Span/SpanWithin.php on lines 1..119

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

          <?php
          /**
          * DISCLAIMER
          *
          * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
          src/module-elasticsuite-core/Search/Request/Query/Span/SpanContaining.php on lines 1..120
          src/module-elasticsuite-core/Search/Request/Query/Span/SpanNot.php on lines 1..119
          Severity
          Category
          Status
          Source
          Language