modxcms/revolution

View on GitHub

Showing 4,334 of 7,873 total issues

File superboxselect.js has 1483 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Ext.namespace('Ext.ux.form');
/**
 * <p>SuperBoxSelect is an extension of the ComboBox component that displays selected items as labelled boxes within the form field. As seen on facebook, hotmail and other sites.</p>
 * 
 * @author <a href="mailto:dan.humphrey@technomedia.co.uk">Dan Humphrey</a>
Severity: Major
Found in manager/assets/modext/util/superboxselect.js - About 3 days to fix

    File ec2.class.php has 1382 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/ec2.class.php - About 3 days to fix

      Function set has a Cognitive Complexity of 177 (exceeds 5 allowed). Consider refactoring.
      Open

          public function set($k, $v= null, $vType= '') {
              $set= false;
              $callback= '';
              $callable= !empty($vType) && is_callable($vType, false, $callback) ? true : false;
              if (!$callable && isset($this->_fieldMeta[$k]['callback'])) {
      Severity: Minor
      Found in core/xpdo/om/xpdoobject.class.php - About 3 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 getid3_bmp has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette=false, $ExtractData=false) {
      
              // shortcuts
              $ThisFileInfo['bmp']['header']['raw'] = array();
              $thisfile_bmp                         = &$ThisFileInfo['bmp'];
      Severity: Minor
      Found in core/model/phpthumb/phpthumb.bmp.php - About 3 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 modx.browser.js has 1316 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      Ext.namespace('MODx.browser');
      
      MODx.Browser = function(config) {
          if (MODx.browserOpen && !config.multiple) return false;
          if (!config.multiple) MODx.browserOpen = true;
      Severity: Major
      Found in manager/assets/modext/widgets/media/modx.browser.js - About 3 days to fix

        Function Expression has a Cognitive Complexity of 164 (exceeds 5 allowed). Consider refactoring.
        Open

            private function Expression($x, $stop=false)
            {
                $operators = array();
                $operands = array();
                $n = false;
        Severity: Minor
        Found in manager/min/lib/JSMinPlus.php - About 3 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 save has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring.
        Open

            public function save($cacheFlag= null) {
                if ($this->isLazy()) {
                    $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, 'Attempt to save lazy object: ' . print_r($this->toArray('', true), 1));
                    return false;
                }
        Severity: Minor
        Found in core/xpdo/om/xpdoobject.class.php - About 3 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

        Method ImageMagickThumbnailToGD has 652 lines of code (exceeds 25 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: Major
        Found in core/model/phpthumb/phpthumb.class.php - About 3 days to fix

          Function parse has a Cognitive Complexity of 159 (exceeds 5 allowed). Consider refactoring.
          Open

            public function parse($value)
            {
              $value = str_replace("\t", '  ', $value); // Convert tabs to spaces.
          
              $this->currentLineNb = -1;
          Severity: Minor
          Found in core/model/aws/lib/yaml/lib/sfYamlParser.php - About 3 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 createObjectContainer has a Cognitive Complexity of 157 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createObjectContainer($className) {
                  $created= false;
                  if ($this->xpdo->getConnection(array(xPDO::OPT_CONN_MUTABLE => true))) {
                      $instance= $this->xpdo->newObject($className);
                      if ($instance) {
          Severity: Minor
          Found in core/xpdo/om/mysql/xpdomanager.class.php - About 3 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

          Smarty_Internal_Templateparser has 161 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Smarty_Internal_Templateparser
          {
              // line 23 "../smarty/lexer/smarty_internal_templateparser.y"
              const ERR1                      = 'Security error: Call to private object member not allowed';
              const ERR2                      = 'Security error: Call to dynamic object member not allowed';
          Severity: Major
          Found in core/model/smarty/sysplugins/smarty_internal_templateparser.php - About 3 days to fix

            Function get has a Cognitive Complexity of 156 (exceeds 5 allowed). Consider refactoring.
            Open

                public function get($k, $format = null, $formatTemplate= null) {
                    $value= null;
                    if (is_array($k)) {
                        $lazy = array_intersect($k, $this->_lazy);
                        if ($lazy) {
            Severity: Minor
            Found in core/xpdo/om/xpdoobject.class.php - About 3 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 ext-prototype-adapter-debug.js has 1221 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/prototype/ext-prototype-adapter-debug.js - About 3 days to fix

              Function EventManager has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring.
              Open

              Ext.EventManager = function(){
                  var docReadyEvent, docReadyProcId, docReadyState = false;
                  var resizeEvent, resizeTask, textEvent, textSize;
                  var E = Ext.lib.Event;
                  var D = Ext.lib.Dom;
              Severity: Minor
              Found in manager/assets/modext/util/eventfix.js - About 3 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 DomQuery has 625 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Ext.DomQuery = function(){
                  var cache = {}, 
                      simpleCache = {}, 
                      valueCache = {},
                      nonSpace = /\S/,
              Severity: Major
              Found in setup/assets/js/ext-core-debug.js - About 3 days to fix

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

                /**
                 * Generates the Resource Tree in Ext
                 *
                 * @class MODx.tree.Resource
                 * @extends MODx.tree.Tree
                Severity: Major
                Found in manager/assets/modext/widgets/resource/modx.tree.resource.js - About 3 days to fix

                  File phpthumb.filters.php has 1201 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.filters.php - About 3 days to fix

                    File ext-jquery-adapter-debug.js has 1190 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/jquery/ext-jquery-adapter-debug.js - About 3 days to fix

                      File uploaddialog.js has 1168 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * This namespace should be in another file but I dicided to put it here for consistancy.
                       */
                      Ext.namespace('Ext.ux.Utils');
                      
                      
                      Severity: Major
                      Found in manager/assets/modext/util/uploaddialog.js - About 3 days to fix

                        File transport.core.events.php has 1143 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         *
                         * @package modx
                         */
                        Severity: Major
                        Found in _build/data/transport.core.events.php - About 2 days to fix
                          Severity
                          Category
                          Status
                          Source
                          Language