modxcms/revolution

View on GitHub

Showing 4,334 of 7,873 total issues

File ext-core-debug.js has 5233 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Ext Core Library 3.0
 * http://extjs.com/
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * 
Severity: Major
Found in setup/assets/js/ext-core-debug.js - About 2 wks to fix

    Function ImageMagickThumbnailToGD has a Cognitive Complexity of 570 (exceeds 5 allowed). Consider refactoring.
    Open

        public function ImageMagickThumbnailToGD() {
            // http://www.imagemagick.org/script/command-line-options.php
    
            $this->useRawIMoutput = true;
            if (phpthumb_functions::gd_version()) {
    Severity: Minor
    Found in core/model/phpthumb/phpthumb.class.php - About 1 wk 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 phpthumb.class.php has 3768 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    //////////////////////////////////////////////////////////////
    //   phpThumb() by James Heinrich <info@silisoftware.com>   //
    //        available at http://phpthumb.sourceforge.net      //
    //         and/or https://github.com/JamesHeinrich/phpThumb //
    Severity: Major
    Found in core/model/phpthumb/phpthumb.class.php - About 1 wk to fix

      File FileAPI.js has 3146 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! FileAPI 2.0.19 - BSD | git://github.com/mailru/FileAPI.git
       * FileAPI — a set of  javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
       */
      
      /*
      Severity: Major
      Found in manager/assets/fileapi/FileAPI.js - About 1 wk to fix

        File smarty_internal_templateparser.php has 3133 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        class TP_yyStackEntry
        {
            public $stateno;       /* The state-number */
        Severity: Major
        Found in core/model/smarty/sysplugins/smarty_internal_templateparser.php - About 1 wk to fix

          File pclzip.lib.php has 2952 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          // --------------------------------------------------------------------------------
          // PhpConcept Library - Zip Module 2.8.2
          // --------------------------------------------------------------------------------
          // License GNU/LGPL - Vincent Blavet - August 2009
          Severity: Major
          Found in core/xpdo/compression/pclzip.lib.php - About 1 wk to fix

            Function DomQuery has a Cognitive Complexity of 392 (exceeds 5 allowed). Consider refactoring.
            Open

            Ext.DomQuery = function(){
                var cache = {}, 
                    simpleCache = {}, 
                    valueCache = {},
                    nonSpace = /\S/,
            Severity: Minor
            Found in setup/assets/js/ext-core-debug.js - About 1 wk 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 PHPMailer.php has 2804 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             * PHPMailer - PHP email creation and transport class.
             * PHP Version 5.5.
            Severity: Major
            Found in core/model/modx/mail/phpmailer/src/PHPMailer.php - About 1 wk to fix

              Function filter has a Cognitive Complexity of 362 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function filter(&$element) {
                      $usemb = function_exists('mb_strlen') && (boolean)$this->modx->getOption('use_multibyte',null,false);
                      $encoding = $this->modx->getOption('modx_charset',null,'UTF-8');
              
                      $output= & $element->_output;
              Severity: Minor
              Found in core/model/modx/filters/modoutputfilter.class.php - About 1 wk 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 parseSchema has a Cognitive Complexity of 346 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function parseSchema($schemaFile, $outputDir= '', $compile= false) {
                      $this->schemaFile= $schemaFile;
                      $this->classTemplate= $this->getClassTemplate();
                      if (!is_file($schemaFile)) {
                          $this->manager->xpdo->log(xPDO::LOG_LEVEL_ERROR, "Could not find specified XML schema file {$schemaFile}");
              Severity: Minor
              Found in core/xpdo/om/xpdogenerator.class.php - About 1 wk 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 transport.core.system_settings.php has 2265 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Default System Settings for MODX Revolution
               *
               * @package modx
              Severity: Major
              Found in _build/data/transport.core.system_settings.php - About 6 days to fix

                File ext-base-debug.js has 2055 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                This file is part of Ext JS 3.4
                
                Copyright (c) 2011-2013 Sencha Inc
                
                
                Severity: Major
                Found in manager/assets/ext3/adapter/ext/ext-base-debug.js - About 5 days to fix

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

                  <?php
                  /*
                   * OpenExpedio ("xPDO") is an ultra-light, PHP 5.2+ compatible ORB (Object-
                   * Relational Bridge) library based around PDO (http://php.net/pdo/).
                   *
                  Severity: Major
                  Found in core/xpdo/xpdo.class.php - About 5 days to fix

                    Function testInstall has a Cognitive Complexity of 251 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static function testInstall(Smarty $smarty, &$errors = null)
                        {
                            $status = true;
                            if ($errors === null) {
                                echo "<PRE>\n";
                    Severity: Minor
                    Found in core/model/smarty/sysplugins/smarty_internal_testinstall.php - About 5 days 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 compileTag2 has a Cognitive Complexity of 243 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function compileTag2($tag, $args, $parameter)
                        {
                            $plugin_type = '';
                            // $args contains the attributes parsed and compiled by the lexer/parser
                            // assume that tag does compile into code, but creates no HTML output
                    Severity: Minor
                    Found in core/model/smarty/sysplugins/smarty_internal_templatecompilerbase.php - About 4 days 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 ApplyFilters has a Cognitive Complexity of 241 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function ApplyFilters() {
                            if ($this->fltr && is_array($this->fltr)) {
                                if (!include_once __DIR__ .'/phpthumb.filters.php' ) {
                                    $this->DebugMessage('Error including "'. __DIR__ .'/phpthumb.filters.php" which is required for applying filters ('.implode(';', $this->fltr).')', __FILE__, __LINE__);
                                    return false;
                    Severity: Minor
                    Found in core/model/phpthumb/phpthumb.class.php - About 4 days 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 xpdoobject.class.php has 1763 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /*
                     * Copyright 2010-2015 by MODX, LLC.
                     *
                     * This file is part of xPDO.
                    Severity: Major
                    Found in core/xpdo/om/xpdoobject.class.php - About 4 days to fix

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

                      <?php
                      /*
                       * Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
                       *
                       * Licensed under the Apache License, Version 2.0 (the "License").
                      Severity: Major
                      Found in core/model/aws/services/s3.class.php - About 4 days to fix

                        File modx.class.php has 1725 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/modx.class.php - About 4 days to fix

                          File JSMinPlus.php has 1633 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          /**
                           * JSMinPlus version 1.4
                           *
                          Severity: Major
                          Found in manager/min/lib/JSMinPlus.php - About 4 days to fix
                            Severity
                            Category
                            Status
                            Source
                            Language