qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

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

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'AddClasses':
                    try {
                        $this->blnAddClasses = QType::Cast($mixValue, QType::Boolean);
Severity: Minor
Found in includes/base_controls/QDraggableGen.class.php - About 7 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 QImageLabelBase.class.php has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Method Send has 186 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public static function Send(QEmailMessage $objMessage) {
                $objResource = null;
    
                if (QEmailServer::$TestMode) {
                    // Open up a File Resource to the TestModeDirectory
    Severity: Major
    Found in includes/framework/QEmailServer.class.php - About 7 hrs to fix

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

      <?php
          // The built in SOAP WSDL Cache doesn't work very well
          // We use QCache to implement a much smarter WSDL cache mechanism
          // Because of this, we *MUST* set wsdl_cache_enabled to FALSE
          ini_set('soap.wsdl_cache_enabled', false);
      Severity: Minor
      Found in includes/framework/QSoapService.class.php - About 7 hrs to fix

        Function ParsePostData has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

                public function ParsePostData() {
        
                    $blnIsDateTimeSet = false;
                    if ($this->dttDateTime == null) {
                        $dttNewDateTime = QDateTime::Now();
        Severity: Minor
        Found in includes/base_controls/QDateTimePicker.class.php - About 7 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

        Method DisplayHtml has 184 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static function DisplayHtml($strText, $strCssClass) {
                    $strText = trim(str_replace("\r", '', $strText));
                    $strToReturn = '';
        
                    $objStateStack = new QStack();
        Severity: Major
        Found in includes/base_controls/QWriteBox.class.php - About 7 hrs to fix

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

          <?php
          /**
           * This file contains the QImageBrowser class and supporting classes.
           *
           * @package Controls
          Severity: Minor
          Found in includes/base_controls/QImageBrowser.class.php - About 7 hrs to fix

            Function ExpandArray has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function ExpandArray ($objDbRow, $strAliasPrefix, $objNode, $objPreviousItemArray, $strColumnAliasArray) {
                    if (!$objNode->ChildNodeArray) {
                        return null;
                    }
                    $blnExpanded = null;
            Severity: Minor
            Found in includes/framework/QModelTrait.trait.php - About 7 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 QTextBoxBase.class.php has 466 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

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

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

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

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

                <?php
                /**
                 * EXPERIMENTAL Informix database driver, based on PDO. 
                 * 
                 *
                Severity: Minor
                Found in includes/database/QInformixPdoDatabase.class.php - About 7 hrs to fix

                  Function Qcubed__DateTimePicker_Change has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function Qcubed__DateTimePicker_Change(strControlId, objListbox) {
                      var objMonth = document.getElementById(strControlId + "_lstMonth"),
                          objDay = document.getElementById(strControlId + "_lstDay"),
                          objYear = document.getElementById(strControlId + "_lstYear"),
                          intCurrentDay,
                  Severity: Minor
                  Found in assets/js/date_time_picker.js - About 6 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 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function __set($strName, $mixValue) {
                              switch ($strName) {
                                  case 'AppendTo':
                                      $this->mixAppendTo = $mixValue;
                                      $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
                  Severity: Minor
                  Found in includes/base_controls/QSortableGen.class.php - About 6 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 OverrideAttributes has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public final function OverrideAttributes($mixOverrideArray) {
                              // Iterate through the OverrideAttribute Array
                              if ($mixOverrideArray) foreach ($mixOverrideArray as $mixOverrideItem) {
                                  if (is_array($mixOverrideItem)) {
                                      foreach ($mixOverrideItem as $strKey=>$mixValue)
                  Severity: Minor
                  Found in includes/framework/QBaseClass.class.php - About 6 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

                  Method Run has 172 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                              // See if we can get a Form Class out of PostData
                              $objClass = null;
                              if ($strFormId === null) {
                                  $strFormId = $strFormClass;
                  Severity: Major
                  Found in includes/base_controls/QFormBase.class.php - About 6 hrs to fix

                    Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _generateHTML: function(inst) {
                            var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                                controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                                monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                                selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
                    Severity: Major
                    Found in assets/js/jquery/jquery-ui.custom.js - About 6 hrs to fix

                      Function LogQuery has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                      Open

                              private function LogQuery($strQuery, $dblQueryTime) {
                                  if ($this->blnEnableProfiling) {
                                      // Dereference-ize Backtrace Information
                                      $objDebugBacktrace = debug_backtrace();
                                      
                      Severity: Minor
                      Found in includes/framework/QDatabaseBase.class.php - About 6 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

                      Method Validate has 165 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function Validate() {
                              $result = array();
                              
                              if(ini_get('safe_mode') ){
                                  $obj = new QInstallationValidationResult();
                      Severity: Major
                      Found in includes/framework/QInstallationValidator.class.php - About 6 hrs to fix

                        Function __construct has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                        Open

                                public function __construct($mixValue = null, DateTimeZone $objTimeZone = null, $intType = QDateTime::UnknownType) {
                                    if ($mixValue instanceof QDateTime) {
                                        // Cloning from another QDateTime object
                                        if ($objTimeZone)
                                            throw new QCallerException('QDateTime cloning cannot take in a DateTimeZone parameter');
                        Severity: Minor
                        Found in includes/framework/QDateTime.class.php - About 6 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 43 (exceeds 5 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: Minor
                        Found in includes/database/QMySqlDatabase.class.php - About 6 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