modxcms/revolution

View on GitHub

Showing 4,334 of 7,873 total issues

Function compile has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
Open

    public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
    {
        // check and get attributes
        $_attr = $this->getAttributes($compiler, $args);
        $output = $parameter[ 'value' ];

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

<?php
/*
 * This file is part of MODX Revolution.
 *
 * Copyright (c) MODX, LLC. All Rights Reserved.
Severity: Major
Found in core/model/modx/filters/modoutputfilter.class.php - About 1 day to fix

    Function Chunk has 272 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    MODx.panel.Chunk = function(config) {
        config = config || {};
        config.record = config.record || {};
        config = MODx.setStaticElementsConfig(config, 'chunk');
    
    
    Severity: Major
    Found in manager/assets/modext/widgets/element/modx.panel.chunk.js - About 1 day to fix

      `` has 73 functions (exceeds 20 allowed). Consider refactoring.
      Open

      Ext.extend(Ext.ux.UploadDialog.Dialog, Ext.Window,{
        fsa : null,
        
        state_tpl : null,
        
      Severity: Major
      Found in manager/assets/modext/util/uploaddialog.js - About 1 day to fix

        File setting.inc.php has 618 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Setting English lexicon topic
         *
         * @language en
        Severity: Major
        Found in core/lexicon/ar/setting.inc.php - About 1 day to fix

          File setting.inc.php has 615 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Setting English lexicon topic
           *
           * @language en
          Severity: Major
          Found in core/lexicon/be/setting.inc.php - About 1 day to fix

            File setting.inc.php has 615 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Setting English lexicon topic
             *
             * @language en
            Severity: Major
            Found in core/lexicon/tr/setting.inc.php - About 1 day to fix

              File setting.inc.php has 614 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Setting English lexicon topic
               *
               * @language en
              Severity: Major
              Found in core/lexicon/et/setting.inc.php - About 1 day to fix

                File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Setting English lexicon topic
                 *
                 * @language en
                Severity: Major
                Found in core/lexicon/es/setting.inc.php - About 1 day to fix

                  File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * Setting English lexicon topic
                   *
                   * @language en
                  Severity: Major
                  Found in core/lexicon/it/setting.inc.php - About 1 day to fix

                    File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Setting English lexicon topic
                     *
                     * @language en
                    Severity: Major
                    Found in core/lexicon/fa/setting.inc.php - About 1 day to fix

                      File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * Setting English lexicon topic
                       *
                       * @language en
                      Severity: Major
                      Found in core/lexicon/nl/setting.inc.php - About 1 day to fix

                        File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * Setting English lexicon topic
                         *
                         * @language en
                        Severity: Major
                        Found in core/lexicon/zh/setting.inc.php - About 1 day to fix

                          File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * Setting English lexicon topic
                           *
                           * @language en
                          Severity: Major
                          Found in core/lexicon/bg/setting.inc.php - About 1 day to fix

                            File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * Setting English lexicon topic
                             *
                             * @language en
                            Severity: Major
                            Found in core/lexicon/hu/setting.inc.php - About 1 day to fix

                              File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              /**
                               * Setting English lexicon topic
                               *
                               * @language en
                              Severity: Major
                              Found in core/lexicon/da/setting.inc.php - About 1 day to fix

                                File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /**
                                 * Setting English lexicon topic
                                 *
                                 * @language en
                                Severity: Major
                                Found in core/lexicon/en/setting.inc.php - About 1 day to fix

                                  File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  /**
                                   * Setting English lexicon topic
                                   *
                                   * @language en
                                  Severity: Major
                                  Found in core/lexicon/hi/setting.inc.php - About 1 day to fix

                                    File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    /**
                                     * Setting English lexicon topic
                                     *
                                     * @language en
                                    Severity: Major
                                    Found in core/lexicon/cs/setting.inc.php - About 1 day to fix

                                      File setting.inc.php has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      /**
                                       * Setting English lexicon topic
                                       *
                                       * @language en
                                      Severity: Major
                                      Found in core/lexicon/ja/setting.inc.php - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language