modxcms/revolution

View on GitHub

Showing 4,334 of 7,873 total issues

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

    function gd_info() {
        static $gd_info = array();
        if (empty($gd_info)) {
            // based on code by johnschaefer at gmx dot de
            // from PHP help on gd_info()
Severity: Minor
Found in core/model/phpthumb/phpthumb.functions.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 smarty_internal_testinstall.php has 571 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Smarty Internal TestInstall
 * Test Smarty installation
 *
Severity: Major
Found in core/model/smarty/sysplugins/smarty_internal_testinstall.php - About 1 day to fix

    Function getContainerList has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getContainerList($path) {
            $properties = $this->getPropertyList();
            $list = $this->getS3ObjectList($path);
            $editAction = $this->getEditActionId();
    
    
    Severity: Minor
    Found in core/model/modx/sources/mods3mediasource.class.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

    Function setup has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

        setup: function() {
            var ddTarget = this.config.target;
            var ddTargetEl = this.config.targetEl;
            var cfg = this.config;
    
    
    Severity: Minor
    Found in manager/assets/modext/widgets/modx.treedrop.js - 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

    Function wrapText has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

        public function wrapText($message, $length, $qp_mode = false)
        {
            if ($qp_mode) {
                $soft_break = sprintf(' =%s', static::$LE);
            } else {
    Severity: Minor
    Found in core/model/modx/mail/phpmailer/src/PHPMailer.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 moduser.class.php has 559 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/moduser.class.php - About 1 day to fix

      File Smarty.class.php has 558 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Project:     Smarty: the PHP compiling template engine
       * File:        Smarty.class.php
       *
      Severity: Major
      Found in core/model/smarty/Smarty.class.php - About 1 day to fix

        File modx.tree.element.js has 556 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Generates the Element Tree
         *
         * @class MODx.tree.Element
         * @extends MODx.tree.Tree
        Severity: Major
        Found in manager/assets/modext/widgets/element/modx.tree.element.js - About 1 day to fix

          File smarty_internal_configfilelexer.php has 554 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Smarty Internal Plugin Configfilelexer
           *
           * This is the lexer to break the config file source into tokens
          Severity: Major
          Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 day to fix

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

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

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

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

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

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

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

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

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

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

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

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

                        Function serve has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function serve($controller, $options = array())
                            {
                                if (! self::$isDocRootSet && 0 === stripos(PHP_OS, 'win')) {
                                    self::setDocRoot();
                                }
                        Severity: Minor
                        Found in manager/min/lib/Minify.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

                        Function read has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function read(array $options = array()) {
                                $this->__kill = false;
                                $messages = array();
                                $topicMessages = array();
                                $msgLimit = isset($options['msg_limit']) ? intval($options['msg_limit']) : 5;
                        Severity: Minor
                        Found in core/model/modx/registry/modfileregister.class.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 default.inc.php has 552 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

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

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

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

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