qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Method Init has 219 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public static function Init() {
            $intIndex = -1;

            $intIndex++;
            Examples::$Categories[$intIndex] = array();
Severity: Major
Found in assets/php/examples/includes/examples.inc.php - About 1 day to fix

    Function SqlVariable has a Cognitive Complexity of 56 (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/QSqlServer2005Database.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 56 (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/QSqlServerDatabase.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 218 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function __set($strName, $mixValue) {
                $this->blnModified = true;
    
                switch ($strName) {
                    // APPEARANCE
    Severity: Major
    Found in includes/base_controls/QImageLabelBase.class.php - About 1 day to fix

      Function setDocument has 216 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      setDocument = Sizzle.setDocument = function( node ) {
          var hasCompare,
              doc = node ? node.ownerDocument || node : preferredDoc,
              parent = doc.defaultView;
      
      
      Severity: Major
      Found in assets/js/jquery/jquery.js - About 1 day to fix

        QFormBase has 59 functions (exceeds 20 allowed). Consider refactoring.
        Open

            abstract class QFormBase extends QBaseClass {
                ///////////////////////////
                // Static Members
                ///////////////////////////
                /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */
        Severity: Major
        Found in includes/base_controls/QFormBase.class.php - About 1 day to fix

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

                  public function __set($strName, $mixValue) {
                      switch ($strName) {
                          case 'AddClasses':
                              try {
                                  $this->blnAddClasses = QType::Cast($mixValue, QType::Boolean);
          Severity: Major
          Found in includes/base_controls/QDraggableGen.class.php - About 1 day to fix

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

                    public function __set($strName, $mixValue) {
                        // Setters that do not cause a complete redraw
                        switch ($strName) {
                            case "Text":
                            case "Value":
            Severity: Minor
            Found in includes/base_controls/QTextBoxBase.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 208 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function __set($strName, $mixValue) {
                        // Setters that do not cause a complete redraw
                        switch ($strName) {
                            case "Text":
                            case "Value":
            Severity: Major
            Found in includes/base_controls/QTextBoxBase.class.php - About 1 day to fix

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

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

                Function _create has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create: function() {
                        // Some browsers only repeat keydown events, not keypress events,
                        // so we use the suppressKeyPress flag to determine if we've already
                        // handled the keydown event. #7269
                        // Unfortunately the code for & in keypress is the same as the up arrow,
                Severity: Major
                Found in assets/js/jquery/jquery-ui.custom.js - About 1 day to fix

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

                  <?php
                      /**
                       * <p>This control is used to display a simple html table.
                       *
                       * <p>The control itself will display things based off of an array of objects that gets set as the "Data Source".
                  Severity: Minor
                  Found in includes/base_controls/QHtmlTableBase.class.php - About 7 hrs to fix

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

                    <?php
                    /**
                     * EXPERIMENTAL PostgreSQL database driver, based on PDO.
                     * @author Marcos Sanchez [marcosdsanchez at thinkclear dot ar]
                     * @package DatabaseAdapters
                    Severity: Minor
                    Found in includes/database/QPostgreSqlPdoDatabase.class.php - About 7 hrs to fix

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

                      <?php
                      /**
                       * EXPERIMENTAL Oracle database adapter.
                       *
                       * @package DatabaseAdapters
                      Severity: Minor
                      Found in includes/database/QOracleDatabase.class.php - About 7 hrs to fix

                        QQ has 55 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                            class QQ {
                                /////////////////////////
                                // QQCondition Factories
                                /////////////////////////
                        
                        
                        Severity: Major
                        Found in includes/framework/QQuery.class.php - About 7 hrs to fix

                          Method __set has 194 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/QSortableGen.class.php - About 7 hrs to fix

                            Function MakeJqOptions has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    protected function MakeJqOptions() {
                                        $jqOptions = null;
                                        if (!is_null($val = $this->AltField)) {$jqOptions['altField'] = $val;}
                                        if (!is_null($val = $this->AltFormat)) {$jqOptions['altFormat'] = $val;}
                                        if (!is_null($val = $this->AppendText)) {$jqOptions['appendText'] = $val;}
                            Severity: Minor
                            Found in includes/base_controls/QDatepickerGen.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

                            Function MakeJqOptions has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    protected function MakeJqOptions() {
                                        $jqOptions = null;
                                        if (!is_null($val = $this->AltField)) {$jqOptions['altField'] = $val;}
                                        if (!is_null($val = $this->AltFormat)) {$jqOptions['altFormat'] = $val;}
                                        if (!is_null($val = $this->AppendText)) {$jqOptions['appendText'] = $val;}
                            Severity: Minor
                            Found in includes/base_controls/QDatepickerBoxGen.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 examples.inc.php has 487 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                                class Examples {
                                    public static $Categories = array();
                                    public static $AdditionalCode = array();
                                    public static $PluginExamples = array();
                            Severity: Minor
                            Found in assets/php/examples/includes/examples.inc.php - About 7 hrs to fix

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

                                      protected function RenderImage($strPath = null) {
                                          $strWidth = $this->Width;
                              
                                          // Make Sure Font File Exists
                                          if (file_exists($this->strFontNames))
                              Severity: Minor
                              Found in includes/base_controls/QImageLabelBase.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

                              Severity
                              Category
                              Status
                              Source
                              Language