Showing 838 of 1,520 total issues

File Order.php has 550 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @property integer $id
 * @property integer $delivery_id
 * @property double $delivery_price
Severity: Major
Found in protected/modules/order/models/Order.php - About 1 day to fix

    File Post.php has 538 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Post
     *
     * Модель для работы с постами
    Severity: Major
    Found in protected/modules/blog/models/Post.php - About 1 day to fix

      Method __construct has 222 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function __construct()
          {
              parent::__construct(
                  [
                      self::ST_COMMON_QUERY_ELEMENT,

        Method safeUp has 213 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function safeUp()
            {
                // blog
                $this->createTable(
                    '{{blog_blog}}',

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

              public function rewrite(Zend_Search_Lucene_Interface $index)
              {
                  $this->_matches = [];
                  $this->_scores = [];
                  $this->_termKeys = [];

          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

          Product has 57 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Product extends yupe\models\YModel implements ICommentable
          {
              /**
               *
               */
          Severity: Major
          Found in protected/modules/store/models/Product.php - About 1 day to fix

            Zend_Search_Lucene has 56 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
            {
                /**
                 * Default field name for search
                 *
            Severity: Major
            Found in protected/modules/zendsearch/vendors/Zend/Search/Lucene.php - About 1 day to fix

              File StoreModule.php has 498 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              use yupe\components\WebModule;
              
              /**
              Severity: Minor
              Found in protected/modules/store/StoreModule.php - About 7 hrs to fix

                File QueryParser.php has 492 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

                  WebModule has 53 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  abstract class WebModule extends CWebModule
                  {
                      /**
                       *
                       */
                  Severity: Major
                  Found in protected/modules/yupe/components/WebModule.php - About 7 hrs to fix

                    File Writer.php has 473 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

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

                      Method optimize has 179 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method moduleRow has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function moduleRow($module, &$updates, &$modules)
                        {
                            ?>
                            <tr class="<?= ($module->getIsActive()) ? (is_array(
                                $module->checkSelf()
                        Severity: Major
                        Found in protected/modules/yupe/views/backend/_moduleslist.php - About 7 hrs to fix

                          File jquery-sortable.js has 460 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /* ===================================================
                           *  jquery-sortable.js v0.9.11
                           *  http://johnny.github.com/jquery-sortable/
                           * ===================================================
                           *  Copyright (c) 2012 Jonas von Andrian
                          Severity: Minor
                          Found in protected/modules/store/views/assets/js/jquery-sortable.js - About 7 hrs to fix

                            Method __construct has 175 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function __construct()
                                {
                                    parent::__construct(
                                        [
                                            self::ST_WHITE_SPACE,

                              Method actionRequirements has 174 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function actionRequirements()
                                  {
                                      $requirements = [
                                          [
                                              Yii::t('InstallModule.install', 'РНР version'),
                              Severity: Major
                              Found in protected/modules/install/controllers/DefaultController.php - About 6 hrs to fix

                                File Boolean.php has 455 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

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

                                  Function actionModulesinstall has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function actionModulesinstall()
                                      {
                                          set_time_limit(180);
                                  
                                          $error = false;
                                  Severity: Minor
                                  Found in protected/modules/install/controllers/DefaultController.php - About 6 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

                                  Method getAuthItems has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getAuthItems()
                                      {
                                          return [
                                              [
                                                  'type' => AuthItem::TYPE_ROLE,
                                  Severity: Major
                                  Found in protected/modules/store/StoreModule.php - About 6 hrs to fix

                                    Function skipTo has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function skipTo(Zend_Search_Lucene_Index_Term $prefix)
                                        {
                                            if ($this->_termDictionary === null) {
                                                $this->_loadDictionaryIndex();
                                            }

                                    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