Showing 1,591 of 20,976 total issues

Function Multiple has 298 lines of code (exceeds 25 allowed). Consider refactoring.
Open

AC.Crud.Edit.Multiple = function() {

    var infoHandler        = AC.Core.Alert.show;
    var warningHandler    = AC.Core.Alert.warning;
    var errorHandler    = AC.Core.Alert.error;
Severity: Major
Found in core/modules/_core/res/js/crud/field/multiple.js - About 1 day to fix

    Function Edit has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
    Open

    AC.Crud.Edit = function() {
    
        var infoHandler        = AC.Core.Alert.show;
        var warningHandler    = AC.Core.Alert.warning;
        var errorHandler    = AC.Core.Alert.error;
    Severity: Minor
    Found in core/modules/_core/res/js/crud/edit.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

    File CSS3Maximizer.php has 658 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /*
    
        CSS3Maximizer : v0.1 : mudcu.be
    Severity: Major
    Found in lib/Ajde/Document/Processor/Css/lib/maximizer/CSS3Maximizer.php - About 1 day to fix

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

          public function __construct(Google_Client $client)
          {
              parent::__construct($client);
              $this->servicePath = 'plus/v1/';
              $this->version = 'v1';
      Severity: Major
      Found in lib/Ajde/Social/Provider/Google/Google/Service/Plus.php - About 1 day to fix

        Ajde_Model has 72 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Ajde_Model extends Ajde_Object_Standard
        {
            const ENCRYPTION_PREFIX = '$$$ENCRYPTED$$$';
        
            protected $_connection;
        Severity: Major
        Found in lib/Ajde/Model.php - About 1 day to fix

          File OAuth.php has 591 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          // vim: foldmethod=marker
          
          /* Generic exception class
          Severity: Major
          Found in lib/Ajde/Social/Provider/Twitter/OAuth.php - About 1 day to fix

            File _coreCrudController.php has 584 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             * Default to extend Ajde_Acl_Controller for enhanced security.
             */
            Severity: Major
            Found in core/modules/_core/_coreCrudController.php - About 1 day to fix

              Function Multiple has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
              Open

              AC.Crud.Edit.Multiple = function() {
              
                  var infoHandler        = AC.Core.Alert.show;
                  var warningHandler    = AC.Core.Alert.warning;
                  var errorHandler    = AC.Core.Alert.error;
              Severity: Minor
              Found in core/modules/_core/res/js/crud/field/multiple.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 ajax has 242 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ajax: function( url, options ) {
              
                      // If url is an object, simulate pre-1.5 signature
                      if ( typeof url === "object" ) {
                          options = url;
              Severity: Major
              Found in public/assets/js/core/jquery/1.7.2/jquery-1.7.2.js - About 1 day to fix

                NodeModel has 66 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class NodeModel extends Ajde_Model_With_AclI18nRevision
                {
                    protected $_autoloadParents = false;
                    protected $_displayField = 'title';
                    protected $_hasMeta = true;
                Severity: Major
                Found in core/modules/node/model/NodeModel.php - About 1 day to fix

                  Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      ajax: function( url, options ) {
                  
                          // If url is an object, simulate pre-1.5 signature
                          if ( typeof url === "object" ) {
                              options = url;
                  Severity: Major
                  Found in public/assets/js/core/jquery/2.1.4/jquery-2.1.4.js - About 1 day to fix

                    Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        ajax: function( url, options ) {
                    
                            // If url is an object, simulate pre-1.5 signature
                            if ( typeof url === "object" ) {
                                options = url;
                    Severity: Major
                    Found in public/assets/js/core/jquery/1.11.3/jquery-1.11.3.js - About 1 day to fix

                      Method getNodeOptions has 238 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getNodeOptions()
                          {
                              // show only
                              $showOnlyWhenFields = [
                                  'title',
                      Severity: Major
                      Found in core/modules/node/NodeController.php - About 1 day to fix

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

                            public static function trigger($object, $event, array $parameters = [])
                            {
                                foreach (self::$eventStack as $className => $eventStack) {
                                    if (self::className($object) == $className ||
                                        is_subclass_of(self::className($object), $className)
                        Severity: Minor
                        Found in lib/Ajde/Event.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 validEmail has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function validEmail($email)
                            {
                                $isValid = true;
                                $atIndex = strrpos($email, '@');
                                if (is_bool($atIndex) && !$atIndex) {
                        Severity: Minor
                        Found in lib/Ajde/Component/String.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 doItalicsAndBold has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function doItalicsAndBold($text)
                            {
                                $token_stack = [''];
                                $text_stack = [''];
                                $em = '';
                        Severity: Minor
                        Found in lib/Ajde/Component/Markdown/markdown.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 parse has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function parse($source)
                            {
                                // Reset
                                $this->source = '';
                                $this->tokens = [];
                        Severity: Minor
                        Found in lib/Ajde/Resource/Local/Compressor/lib/Cssmin.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 setDocument has 218 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        setDocument = Sizzle.setDocument = function( node ) {
                            var hasCompare, parent,
                                doc = node ? node.ownerDocument || node : preferredDoc;
                        
                            // If no document and documentElement is available, return
                        Severity: Major
                        Found in public/assets/js/core/jquery/2.1.4/jquery-2.1.4.js - About 1 day to fix

                          Function setDocument has 218 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          setDocument = Sizzle.setDocument = function( node ) {
                              var hasCompare, parent,
                                  doc = node ? node.ownerDocument || node : preferredDoc;
                          
                              // If no document and documentElement is available, return
                          Severity: Major
                          Found in public/assets/js/core/jquery/1.11.3/jquery-1.11.3.js - About 1 day to fix

                            prototype has 59 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            qq.FineUploaderBasic.prototype = {
                                log: function(str, level) {
                                    if (this._options.debug && (!level || level === 'info')) {
                                        qq.log('[FineUploader] ' + str);
                                    }
                            Severity: Major
                            Found in public/assets/js/core/fineuploader/jquery.fineuploader-3.4.1.js - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language