qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Function MakeJqOptions has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        protected function MakeJqOptions() {
            $jqOptions = null;
            if (!is_null($val = $this->AlsoResize)) {$jqOptions['alsoResize'] = $val;}
            if (!is_null($val = $this->Animate)) {$jqOptions['animate'] = $val;}
            if (!is_null($val = $this->AnimateDuration)) {$jqOptions['animateDuration'] = $val;}
Severity: Minor
Found in includes/base_controls/QResizableGen.class.php - About 2 hrs 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 GetClassWrapper has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetClassWrapper() {
            $strNewClass = sprintf('<?php class %sWrapper extends %s { ', $this->strClassName, $this->strClassName);

            foreach ($this->objMethodArray as $objMethod) {
                $strParameterArray = array();
Severity: Minor
Found in includes/framework/QSoapService.class.php - About 2 hrs 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 __set has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public function __set($strName, $mixValue) {
        switch ($strName) {
            case "SortColumnId":
                try {
                    $this->strSortColumnId = QType::Cast($mixValue, QType::String);
Severity: Minor
Found in includes/base_controls/QDataGridBase.class.php - About 2 hrs 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 __set has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'DataSource':
                    // Assign data to a DataSource from within the data binder function only.
                    // Data should be array items that at a minimum contain a 'value' and an 'id'
Severity: Minor
Found in includes/base_controls/QAutocompleteBase.class.php - About 2 hrs 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 __set has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'Accept':
                    $this->mixAccept = $mixValue;
                    $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'accept', $mixValue);
Severity: Minor
Found in includes/base_controls/QDroppableGen.class.php - About 2 hrs 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 MakeJqOptions has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        protected function MakeJqOptions() {
            $jqOptions = null;
            if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
            if (!is_null($val = $this->AutoOpen)) {$jqOptions['autoOpen'] = $val;}
            if (!is_null($val = $this->Buttons)) {$jqOptions['buttons'] = $val;}
Severity: Minor
Found in includes/base_controls/QDialogGen.class.php - About 2 hrs 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 ModelConnectorControlClass has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        protected function ModelConnectorControlClass($objColumn) {

            // Is the class specified by the developer?
            if ($o = $objColumn->Options) {
                if (isset ($o['FormGen']) && $o['FormGen'] == QFormGen::LabelOnly) {
Severity: Minor
Found in includes/codegen/QCodeGenBase.class.php - About 2 hrs 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 dtgPlugins_Bind has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

        public function dtgPlugins_Bind() {
            if (!is_dir(__PLUGINS__)) {
                return;
            }
            $pluginDirArray = scandir ( __PLUGINS__);
Severity: Minor
Found in assets/php/_devtools/plugin_manager.php - About 2 hrs 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 __construct has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($name, $origName, $signature, $description) {
        parent::__construct($origName, $description);
        $this->name = ucfirst($name);
        $signature = str_replace("\n", '', $signature);
        $this->signature = $signature;
Severity: Minor
Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 2 hrs 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 bounce has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var effectBounce = $.effects.effect.bounce = function( o, done ) {
    var el = $( this ),
        props = [ "position", "top", "bottom", "left", "right", "height", "width" ],

        // defaults:
Severity: Major
Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

    Method SqlVariable has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                // Are we SqlVariabling a BOOLEAN value?
                if (is_bool($mixData)) {
                    // Yes
                    if ($blnIncludeEquality) {
    Severity: Major
    Found in includes/framework/QDatabaseBase.class.php - About 2 hrs to fix

      Method __set has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function __set($strName, $mixValue) {
                  switch ($strName) {
                      // APPEARANCE
      
                      case "Text":
      Severity: Major
      Found in includes/base_controls/QCheckBox.class.php - About 2 hrs to fix

        Method __set has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function __set($strName, $mixValue) {
                    $this->blnModified = true;
        
                    switch ($strName) {
                        // APPEARANCE
        Severity: Major
        Found in includes/base_controls/QCsvTextBox.class.php - About 2 hrs to fix

          Method RenderAjax has 64 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  protected function RenderAjax() {
                      $aResponse = array();
          
                      if (QApplication::$JavascriptExclusiveCommand) {
                          /**
          Severity: Major
          Found in includes/base_controls/QFormBase.class.php - About 2 hrs to fix

            Method __set has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function __set($strName, $mixValue) {
                        $this->blnModified = true;
            
                        switch ($strName) {
                            case "Navigation1":
            Severity: Major
            Found in includes/base_controls/QImageBrowser.class.php - About 2 hrs to fix

              Function resize has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  resize: function() {
                      var outerDimensions,
                          that = $(this).resizable( "instance" ),
                          o = that.options,
                          cs = that.size,
              Severity: Major
              Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

                Function _processTabs has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _processTabs: function() {
                        var that = this;
                
                        this.tablist = this._getList()
                            .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
                Severity: Major
                Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

                  Method Save has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static function Save($strFormState, $blnBackButtonFlag) {
                              $objDatabase = QApplication::$Database[self::$intDbIndex];
                              $strOriginal = $strFormState;
                  
                              // compress (if available)
                  Severity: Major
                  Found in includes/qform_state_handlers/QDbBackedFormStateHandler.class.php - About 2 hrs to fix

                    Method ExpandArray has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function ExpandArray ($objDbRow, $strAliasPrefix, $objNode, $objPreviousItemArray, $strColumnAliasArray) {
                            if (!$objNode->ChildNodeArray) {
                                return null;
                            }
                            $blnExpanded = null;
                    Severity: Major
                    Found in includes/framework/QModelTrait.trait.php - About 2 hrs to fix

                      Method __get has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function __get($strName) {
                                  switch ($strName) {
                                      case "ItemCount":
                                          return $this->GetItemCount();
                      
                      
                      Severity: Major
                      Found in includes/base_controls/QListControl.class.php - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language