Showing 838 of 1,520 total issues

File SegmentInfo.php has 1217 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function _updateSegments has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring.
    Open

        private function _updateSegments()
        {
            // Get an exclusive index lock
            Zend_Search_Lucene_LockManager::obtainWriteLock($this->_directory);
    
    

    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 DefaultController.php has 943 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Default Install Controller
     *
     * @category YupeControllers
    Severity: Major
    Found in protected/modules/install/controllers/DefaultController.php - About 2 days to fix

      Function optimize has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring.
      Open

          public function optimize(Zend_Search_Lucene_Interface $index)
          {
              $subqueries = [];
              $signs = [];
      
      

      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 jquery.colorbox.js has 818 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
          Colorbox 1.5.14
          license: MIT
          http://www.jacklmoore.com/colorbox
      */
      Severity: Major
      Found in protected/modules/image/widgets/colorbox/assets/js/jquery.colorbox.js - About 1 day to fix

        File jquery.colorbox.js has 791 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         Colorbox v1.4.25 - 2013-06-28
         jQuery lightbox and modal window plugin
         (c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox
         license: http://www.opensource.org/licenses/mit-license.php

          File Product.php has 785 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          use yupe\widgets\YPurifier;
          
          Yii::import('zii.behaviors.CTimestampBehavior');
          Yii::import('application.modules.comment.components.ICommentable');
          Severity: Major
          Found in protected/modules/store/models/Product.php - About 1 day to fix

            Function termPositions has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
            Open

                public function termPositions(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null)
                {
                    $termInfo = $this->getTermInfo($term);
            
                    if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) {

            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 Lucene.php has 755 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Zend Framework
             *
             * LICENSE
            Severity: Major
            Found in protected/modules/zendsearch/vendors/Zend/Search/Lucene.php - About 1 day to fix

              Function load has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
              Open

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

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

                  public function termFreqs(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null)
                  {
                      $termInfo = $this->getTermInfo($term);
              
                      if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) {

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

                  public function getModules($navigationOnly = false, $disableModule = false)
                  {
                      $this->otherCategoryName = Yii::t('YupeModule.yupe', 'Other');
              
                      $this->categoryIcon = [
              Severity: Minor
              Found in protected/modules/yupe/components/ModuleManager.php - About 1 day 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

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

              <?php
              /**
               * @var $this ProductBackendController
               * @var $model Product
               * @var $form \yupe\widgets\ActiveForm
              Severity: Major
              Found in protected/modules/store/views/productBackend/_form.php - About 1 day to fix

                Function __construct has a Cognitive Complexity of 70 (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

                Function find has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function find($query)
                    {
                        if (is_string($query)) {
                            require_once 'Zend/Search/Lucene/Search/QueryParser.php';
                
                
                Severity: Minor
                Found in protected/modules/zendsearch/vendors/Zend/Search/Lucene.php - About 1 day 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

                Method _updateSegments has 267 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function _updateSegments()
                    {
                        // Get an exclusive index lock
                        Zend_Search_Lucene_LockManager::obtainWriteLock($this->_directory);
                
                

                  File WebModule.php has 607 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * WebModule - базовый класс для всех модулей Юпи!
                   *
                   * Все модули, разработанные для Юпи! должны наследовать этот класс.
                  Severity: Major
                  Found in protected/modules/yupe/components/WebModule.php - About 1 day to fix

                    File YupeModule.php has 582 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * YupeModule файл класса.
                     * Модуль yupe - основной модуль Юпи!
                     *
                    Severity: Major
                    Found in protected/modules/yupe/YupeModule.php - About 1 day to fix

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

                      <?php
                      /**
                       * @var $model Order
                       * @var $form TbActiveForm
                       */
                      Severity: Major
                      Found in protected/modules/order/views/orderBackend/_form.php - About 1 day to fix

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

                            public function termDocs(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null)
                            {
                                $termInfo = $this->getTermInfo($term);
                        
                                if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) {

                        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