qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Function SqlVariable has a Cognitive Complexity of 65 (exceeds 5 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: Minor
Found in includes/framework/QDatabaseBase.class.php - About 1 day 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 QDataGridLegacyColumn.class.php has 588 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
    /**
     * This file contains the QDataGridEgacyColumn and QFilterType class.
     *
     * @package Controls
Severity: Major
Found in includes/base_controls/QDataGridLegacyColumn.class.php - About 1 day to fix

    Function Validate has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function Validate() {
            $result = array();
            
            if(ini_get('safe_mode') ){
                $obj = new QInstallationValidationResult();
    Severity: Minor
    Found in includes/framework/QInstallationValidator.class.php - About 1 day 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 SqlVariable has a Cognitive Complexity of 64 (exceeds 5 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: Minor
    Found in includes/database/QPostgreSqlPdoDatabase.class.php - About 1 day 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 __set has 248 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function __set($strName, $mixValue) {
                switch ($strName) {
                    // APPEARANCE
                    case "AlternateRowStyle":
                        try {
    Severity: Major
    Found in includes/base_controls/QDataGridLegacyBase.class.php - About 1 day to fix

      Function SqlVariable has a Cognitive Complexity of 63 (exceeds 5 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: Minor
      Found in includes/database/QPostgreSqlDatabase.class.php - About 1 day 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 QPostgreSqlDatabase.class.php has 579 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
          /* QCubed Development Framework for PHP
           * http://www.qcu.be/
           *
           * Copyright (C) 2006
      Severity: Major
      Found in includes/database/QPostgreSqlDatabase.class.php - About 1 day to fix

        Function registerControl has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
        Open

        qcubed.registerControl = function(mixControl) {
            var objControl = qcubed.getControl(mixControl),
                objWrapper;
        
            if (!objControl) {
        Severity: Minor
        Found in assets/js/qcubed.js - About 1 day 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 62 (exceeds 5 allowed). Consider refactoring.
        Open

                public function __set($strName, $mixValue) {
                    $this->blnModified = true;
        
                    switch ($strName) {
                        // APPEARANCE
        Severity: Minor
        Found in includes/base_controls/QImageLabelBase.class.php - About 1 day 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 ExplainStatement has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
        Open

                public function ExplainStatement($sql) {
                    // As of MySQL 5.6.3, EXPLAIN provides information about
                    // SELECT, DELETE, INSERT, REPLACE, and UPDATE statements.
                    // Before MySQL 5.6.3, EXPLAIN provides information only about SELECT statements.
                    
        Severity: Minor
        Found in includes/database/QMySqliDatabase.class.php - About 1 day 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 ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ajax: function( url, options ) {
        
                // If url is an object, simulate pre-1.5 signature
                if ( typeof url === "object" ) {
                    options = url;
        Severity: Major
        Found in assets/js/jquery/jquery.js - About 1 day to fix

          File _actions.inc.php has 564 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
              /**
               * This file contains all basic action classes: QAction, QServerAction, QAjaxAction, etc.
               *
               * @package Actions
          Severity: Major
          Found in includes/base_controls/_actions.inc.php - About 1 day to fix

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

            <?php
            /**
             * QHtmlAttributeManager class
             *
             * This class is designed to be used as a base class for controls and other classes that need to manage HTML attributes.
            Severity: Major
            Found in includes/base_controls/QHtmlAttributeManagerBase.class.php - About 1 day to fix

              Function SqlVariable has a Cognitive Complexity of 59 (exceeds 5 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: Minor
              Found in includes/database/QSqLite3PdoDatabase.class.php - About 1 day 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 SqlVariable has a Cognitive Complexity of 59 (exceeds 5 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: Minor
              Found in includes/database/QInformixPdoDatabase.class.php - About 1 day 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 QSqlServerDatabase.class.php has 550 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
                  /**
                   * Database Adapter for Microsoft SQL Server
                   * Utilizes the Microsoft SQL Server extension php_mssql.dll (win) or the freetds extension (*nix)
                   * 
              Severity: Major
              Found in includes/database/QSqlServerDatabase.class.php - About 1 day to fix

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

                <?php
                
                if (!defined('MYSQLI_ON_UPDATE_NOW_FLAG')) {
                    define ('MYSQLI_ON_UPDATE_NOW_FLAG', 8192);
                }
                Severity: Major
                Found in includes/database/QMySqliDatabase.class.php - About 1 day to fix

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

                  <?php
                      /**
                       * Database Adapter for Microsoft SQL Server 2005/2008
                       * Utilizes the native Microsoft SQL Server extension php_sqlsrv.dll version 1.1 (win)
                       * http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx
                  Severity: Major
                  Found in includes/database/QSqlServer2005Database.class.php - About 1 day to fix

                    Function BuildQueryStatement has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected static function BuildQueryStatement(&$objQueryBuilder, QQCondition $objConditions, $objOptionalClauses, $mixParameterArray, $blnCountOnly) {
                            // Get the Database Object for this Class
                            $objDatabase = static::GetDatabase();
                            $strTableName = static::GetTableName();
                    
                    
                    Severity: Minor
                    Found in includes/framework/QModelTrait.trait.php - About 1 day 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 AnalyzeTable has 220 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            protected function AnalyzeTable(QSqlTable $objTable) {
                                // Setup the Table Object
                                $objTable->OwnerDbIndex = $this->intDatabaseIndex;
                                $strTableName = $objTable->Name;
                                $objTable->ClassName = $this->ModelClassName($strTableName);
                    Severity: Major
                    Found in includes/codegen/QDatabaseCodeGen.class.php - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language