Showing 838 of 1,520 total issues

Method load has 167 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function load($data)
    {
        $termDictionary = [];
        $termInfos = [];
        $pos = 0;

    Zend_Search_Lucene_MultiSearcher has 48 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Zend_Search_Lucene_MultiSearcher implements Zend_Search_Lucene_Interface
    {
        /**
         * List of indices for searching.
         * Array of Zend_Search_Lucene_Interface objects

      File MultiSearcher.php has 444 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Zend Framework
       *
       * LICENSE

        File _form.php has 438 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * @category YupeView
         * @package  yupe
         * @author   Yupe Team <support@yupe.ru>
        Severity: Minor
        Found in protected/modules/menu/views/menuitemBackend/_form.php - About 6 hrs to fix

          Zend_Search_Lucene_Proxy has 46 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Zend_Search_Lucene_Proxy implements Zend_Search_Lucene_Interface
          {
              /**
               * Index object
               *
          Severity: Minor
          Found in protected/modules/zendsearch/vendors/Zend/Search/Lucene/Proxy.php - About 6 hrs to fix

            File index.php has 428 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * @var $this ProductBackendController
             * @var $model Product
             * @var $form ActiveForm
            Severity: Minor
            Found in protected/modules/store/views/productBackend/index.php - About 6 hrs to fix

              Function addDocument has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function addDocument(Zend_Search_Lucene_Document $document)
                  {
                      /** Zend_Search_Lucene_Search_Similarity */
                      require_once 'Zend/Search/Lucene/Search/Similarity.php';
              
              

              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

              File store.js has 423 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              function showNotify(element, result, message) {
                  $('#notifications').html('<div class="alert alert-' + result + '">' + message + '</div>').fadeIn().delay(3000).fadeOut();
              }
              
              $(document).ajaxError(function () {
              Severity: Minor
              Found in themes/shop/web/js/store.js - About 6 hrs to fix

                Function _load21DelFile has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function _load21DelFile()
                    {
                        $delFile = $this->_directory->getFileObject($this->_name . '_' . base_convert($this->_delGen, 10, 36) . '.del');
                
                        $format = $delFile->readInt();

                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

                Method actionDbsettings has 151 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function actionDbsettings()
                    {
                        $this->_markFinished('requirements');
                
                        $dbConfFile = Yii::app()->basePath.'/config/'.'db.php';
                Severity: Major
                Found in protected/modules/install/controllers/DefaultController.php - About 6 hrs to fix

                  File _form.php has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * @category YupeView
                   * @package  yupe
                   * @author   Yupe Team <support@yupe.ru>
                  Severity: Minor
                  Found in protected/modules/page/views/pageBackend/_form.php - About 6 hrs to fix

                    File Migrator.php has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Migrator class file.
                     *
                     * @category YupeComponent
                    Severity: Minor
                    Found in protected/modules/yupe/components/Migrator.php - About 5 hrs to fix

                      Function rewrite has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function rewrite(Zend_Search_Lucene_Interface $index)
                          {
                              $this->_matches = [];
                      
                              if ($this->_pattern->field === null) {

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

                          public function _sloppyPhraseFreq($docId, Zend_Search_Lucene_Interface $reader)
                          {
                              $freq = 0;
                      
                              $phraseQueue = [];

                      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

                      File Blog.php has 406 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /**
                       * Blog
                       *
                      Severity: Minor
                      Found in protected/modules/blog/models/Blog.php - About 5 hrs to fix

                        Order has 42 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Order extends yupe\models\YModel
                        {
                            /**
                             *
                             */
                        Severity: Minor
                        Found in protected/modules/order/models/Order.php - About 5 hrs to fix

                          Function run has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function run()
                              {
                                  // Сбрасываем CSS и JS - они нам не нужны:
                                  Yii::app()->clientScript->reset();
                          
                          
                          Severity: Minor
                          Found in protected/modules/yupe/components/actions/YFeedAction.php - About 5 hrs 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 __construct has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function __construct($fileName, $storeContent)
                              {
                                  if (!class_exists('ZipArchive', false)) {
                                      require_once 'Zend/Search/Lucene/Exception.php';
                                      throw new Zend_Search_Lucene_Exception('MS Office documents processing functionality requires Zip extension to be loaded');

                          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

                          Method getModules has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getModules($navigationOnly = false, $disableModule = false)
                              {
                                  $this->otherCategoryName = Yii::t('YupeModule.yupe', 'Other');
                          
                                  $this->categoryIcon = [
                          Severity: Major
                          Found in protected/modules/yupe/components/ModuleManager.php - About 5 hrs to fix

                            Function rewrite has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function rewrite(Zend_Search_Lucene_Interface $index)
                                {
                                    if ($this->_field === null) {
                                        require_once 'Zend/Search/Lucene/Search/Query/MultiTerm.php';
                                        $query = new Zend_Search_Lucene_Search_Query_MultiTerm();

                            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