qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Function __set has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

        public function __set($strName, $mixValue) {
            $this->blnModified = true;

            switch ($strName) {
                case "Title":
Severity: Minor
Found in includes/base_controls/QDialogBox.class.php - About 3 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 RenderAjax has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

        protected function RenderAjax() {
            $aResponse = array();

            if (QApplication::$JavascriptExclusiveCommand) {
                /**
Severity: Minor
Found in includes/base_controls/QFormBase.class.php - About 3 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 ConnectorRefresh has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

        public function ConnectorRefresh(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn, $blnInit = false) {
            $strObjectName = $objCodeGen->ModelVariableName($objTable->Name);
            $strPropName = QCodeGen::ModelConnectorPropertyName($objColumn);
            $strControlVarName = $this->VarName($strPropName);

Severity: Minor
Found in includes/codegen/controls/QLabelBase_CodeGenerator.class.php - About 3 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

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

<?php
    /**
     * This file contains the QRadioButtonList class.
     *
     * @package Controls
Severity: Minor
Found in includes/base_controls/QRadioButtonList.class.php - About 3 hrs to fix

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

            public function __set($strName, $mixValue) {
                switch ($strName) {
                    case 'Animate':
                        $this->mixAnimate = $mixValue;
                        $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'animate', $mixValue);
    Severity: Major
    Found in includes/base_controls/QSliderGen.class.php - About 3 hrs to fix

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

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

        Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = animationPrefilters.length,
        Severity: Major
        Found in assets/js/jquery/jquery.js - About 3 hrs to fix

          Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _doKeyDown: function(event) {
                  var onSelect, dateStr, sel,
                      inst = $.datepicker._getInst(event.target),
                      handled = true,
                      isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
          Severity: Major
          Found in assets/js/jquery/jquery-ui.custom.js - About 3 hrs to fix

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

            <?php
                /**
                 * This file contains the QTreeNav class.
                 *
                 * @package Controls
            Severity: Minor
            Found in includes/base_controls/QTreeNav.class.php - About 3 hrs to fix

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

                      public function __construct($mixFieldData, $objDb = null) {
                          $this->strName = $mixFieldData->name;
                          $this->strOriginalName = $this->strName;
                          $this->strTable = $mixFieldData->table;
                          $this->strOriginalTable = $mixFieldData->table;
              Severity: Major
              Found in includes/database/QMySqlDatabase.class.php - About 3 hrs to fix

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

                <?php
                
                /**
                 * A HtmlTable that is connected to data. Detects and responds to sort clicks.
                 *
                Severity: Minor
                Found in includes/base_controls/QDataGridBase.class.php - About 3 hrs to fix

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

                  <?php    
                      /**
                       * Triggered when the resizable is created.
                       * 
                       *     * event Type: Event 
                  Severity: Minor
                  Found in includes/base_controls/QResizableGen.class.php - About 3 hrs to fix

                    Function _clear has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _clear: function(event, noPropagation) {
                    
                            this.reverting = false;
                            // We delay all events that have to be triggered to after the point where the placeholder has been removed and
                            // everything else normalized again
                    Severity: Major
                    Found in assets/js/jquery/jquery-ui.custom.js - About 3 hrs to fix

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

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

                        Function __set has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                                public function __set($strName, $mixValue) {
                                    switch ($strName) {
                                        case '_ClickedButton': // Internal only. Do not use. Used by JS above to keep track of clicked button.
                                            try {
                                                $this->strClickedButtonId = QType::Cast($mixValue, QType::String);
                        Severity: Minor
                        Found in includes/base_controls/QDialogBase.class.php - About 3 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 FetchCellValue has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                                public function FetchCellValue($item) {
                                    $strText = parent::FetchCellValue($item);    // allow post processing of cell label
                        
                                    $getVars = null;
                                    if ($this->getVars) {
                        Severity: Minor
                        Found in includes/base_controls/QHtmlTableColumn.class.php - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                                public function __set($strName, $mixValue) {
                                    switch ($strName) {
                                        case "Name":
                                            try {
                                                $this->strName = QType::Cast($mixValue, QType::String);
                        Severity: Minor
                        Found in includes/base_controls/QHtmlTableColumn.class.php - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                        Open

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

                            function QcubedHandleError($__exc_errno, $__exc_errstr, $__exc_errfile, $__exc_errline, $__exc_errcontext) {
                                // If a command is called with "@", then we should return
                                if (error_reporting() == 0)
                                    return true;
                        
                        
                        Severity: Minor
                        Found in includes/error.inc.php - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                                public function __construct($mixFieldData, $objDb = null) {
                                    $this->strName = $mixFieldData->name;
                                    $this->strOriginalName = $mixFieldData->orgname;
                                    $this->strTable = $mixFieldData->table;
                                    $this->strOriginalTable = $mixFieldData->orgtable;
                        Severity: Minor
                        Found in includes/database/QMySqliDatabase.class.php - About 3 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

                        Severity
                        Category
                        Status
                        Source
                        Language