qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

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

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

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

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

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

              public function __set($strName, $mixValue) {
                  switch ($strName) {
                      case 'AppendTo':
                          $this->mixAppendTo = $mixValue;
                          $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
      Severity: Major
      Found in includes/base_controls/QAutocompleteGen.class.php - About 2 hrs to fix

        Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                superMatcher = function( seed, context, xml, results, outermost ) {
                    var elem, j, matcher,
                        matchedCount = 0,
                        i = "0",
                        unmatched = seed && [],
        Severity: Major
        Found in assets/js/jquery/jquery.js - About 2 hrs to fix

          Function _showDatepicker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _showDatepicker: function(input) {
                  input = input.target || input;
                  if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
                      input = $("input", input.parentNode)[0];
                  }
          Severity: Major
          Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

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

                public function __set($strName, $mixValue) {
                    switch ($strName) {
                        case "SortColumnId":
                            try {
                                $this->strSortColumnId = QType::Cast($mixValue, QType::String);
            Severity: Major
            Found in includes/base_controls/QDataGridBase.class.php - About 2 hrs to fix

              Method SqlVariable has 61 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/database/QPostgreSqlPdoDatabase.class.php - About 2 hrs to fix

                File CacheTest.php has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Tests for the ExpandAsArray functionality in QQuery
                 * 
                 * @package Tests
                Severity: Minor
                Found in includes/tests/qcubed-unit/CacheTest.php - About 2 hrs to fix

                  Function __get has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function __get($strName) {
                              switch ($strName) {
                                  case 'Month':
                                      if ($this->blnDateNull)
                                          return null;
                  Severity: Minor
                  Found in includes/framework/QDateTime.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 _QuerySingle has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected static function _QuerySingle(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
                          // Get the Query Statement
                          try {
                              $strQuery = static::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
                          } catch (QCallerException $objExc) {
                  Severity: Minor
                  Found in includes/framework/QModelTrait.trait.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 CollapseNodes has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          protected function CollapseNodes($mixParameterArray) {
                              $objNodeArray = array();
                              foreach ($mixParameterArray as $mixParameter) {
                                  if (is_array($mixParameter)) {
                                      $objNodeArray = array_merge($objNodeArray, $mixParameter);
                  Severity: Minor
                  Found in includes/framework/QQuery.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 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function __set($strName, $mixValue) {
                          switch ($strName) {
                              // APPEARANCE
                              case "Template":
                                  try {
                  Severity: Minor
                  Found in includes/base_controls/QDataRepeater.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 RenderButtonTable has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function RenderButtonTable() {
                              // TODO: Do this without using a table, since this is really not a correct use of html
                              $strToReturn = '';
                              if ($this->ItemCount > 0) {
                                  // Figure out the number of ROWS for this table
                  Severity: Minor
                  Found in includes/base_controls/QRadioButtonList.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 RenderStyles has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                              $strToReturn = '';
                              $this->strIncludedStyleSheetFileArray = array();
                  
                              // Figure out initial list of StyleSheet includes
                  Severity: Minor
                  Found in includes/base_controls/QFormBase.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 RenderBegin has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function RenderBegin($blnDisplayOutput = true) {
                              // Ensure that RenderBegin() has not yet been called
                              switch ($this->intFormStatus) {
                                  case QFormBase::FormStatusUnrendered:
                                      break;
                  Severity: Minor
                  Found in includes/base_controls/QFormBase.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 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function __set($strName, $mixValue) {
                              $this->blnModified = true;
                  
                              switch ($strName) {
                                  case "Navigation1":
                  Severity: Minor
                  Found in includes/base_controls/QImageBrowser.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 ParseForDateTimeValue has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public static function ParseForDateTimeValue($strText) {
                              // Trim and Clean
                              $strText = strtolower(trim($strText));
                              while(strpos($strText, '  ') !== false)
                                  $strText = str_replace('  ', ' ', $strText);
                  Severity: Minor
                  Found in includes/base_controls/QDateTimeTextBox.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 buildTemplateArray has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          protected function buildTemplateArray ($strTemplateFilePath, &$strTemplateArray) {
                              if (!$strTemplateFilePath) return;
                              if (substr( $strTemplateFilePath, -1 ) != '/') {
                                  $strTemplateFilePath .= '/';
                              }
                  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 WordsFromCamelCase has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public static function WordsFromCamelCase($strName) {
                              if (strlen($strName) == 0)
                                  return '';
                  
                              $strToReturn = QString::FirstCharacter($strName);
                  Severity: Minor
                  Found in includes/codegen/QConvertNotationBase.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 init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      init = jQuery.fn.init = function( selector, context ) {
                          var match, elem;
                  
                          // HANDLE: $(""), $(null), $(undefined), $(false)
                          if ( !selector ) {
                  Severity: Major
                  Found in assets/js/jquery/jquery.js - About 2 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language