qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Avoid too many return statements within this method.
Open

        case 'string[]': return 'string[]';
Severity: Major
Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            case 'int': return 'integer';
    Severity: Major
    Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return null;
      Severity: Major
      Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                                return $this->options = QType::Cast($mixValue, QType::ArrayType);
        Severity: Major
        Found in includes/codegen/QManyToManyReference.class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  case 'object': return 'mixed';
          Severity: Major
          Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    case 'double': return 'QType::Float';
            Severity: Major
            Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                      return $this->objColumnArray = QType::Cast($mixValue, QType::ArrayType);                        
              Severity: Major
              Found in includes/codegen/QManyToManyReference.class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        case 'float[]': return 'float[]';
                Severity: Major
                Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          case 'date': return 'QDateTime';
                  Severity: Major
                  Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            case 'double': return 'flt';
                    Severity: Major
                    Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              case 'QDateTime': return 'dtt';
                      Severity: Major
                      Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                default: return 'mix';
                        Severity: Major
                        Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return $jsValue;
                          Severity: Major
                          Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                    case 'string': return 'string';
                            Severity: Major
                            Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      default: return 'QJsClosure';
                              Severity: Major
                              Found in assets/php/_devtools/jquery_ui_gen/jq_control.php - About 30 mins to fix

                                Function SimpleDisplay has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        public function SimpleDisplay(){
                                            $arrTimearray = $this->GetTimearray();
                                            $strToReturn = null;
                                
                                            if($arrTimearray['Years'] != 0) {
                                Severity: Minor
                                Found in includes/framework/QDateTimeSpan.class.php - About 25 mins 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 processCommand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    processCommand: function(command) {
                                        if (command.script) {
                                            /** @todo eval is evil, do no evil */
                                            eval (command.script);
                                        }
                                Severity: Minor
                                Found in assets/js/qcubed.js - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        public function Set($strKey, $objValue, $intExpireAfterSeconds = null) {
                                            if ($intExpireAfterSeconds !== null) {
                                                $this->objPredisClient->set($strKey, serialize($objValue), 'ex', (int)$intExpireAfterSeconds);
                                            } else {
                                                if(defined('_REDIS_CACHE_PROVIDER_DEFAULT_TTL_') && _REDIS_CACHE_PROVIDER_DEFAULT_TTL_ > 0) {
                                Severity: Minor
                                Found in includes/framework/QCacheProviderRedis.class.php - About 25 mins 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 IsIPInRange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        public static function IsIPInRange($ip, $range) {
                                            $ip = trim($ip);
                                            if (strpos($range, '/') !== false) {
                                                // we are given a IP/mask
                                                list($net, $mask) = explode('/', $range);
                                Severity: Minor
                                Found in includes/framework/QApplicationBase.class.php - About 25 mins 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 ExecuteJsFunction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        public static function ExecuteJsFunction($strFunctionName /*, ... */) {
                                            $args = func_get_args();
                                            array_shift ($args);
                                            if ($args && end($args) === QJsPriority::High) {
                                                $code = QAjaxResponse::CommandsHigh;
                                Severity: Minor
                                Found in includes/framework/QApplicationBase.class.php - About 25 mins 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