qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

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

<?php    
    /**
     * This event is triggered when using connected lists, every connected
     * list on drag start receives it.
     * 
Severity: Minor
Found in includes/base_controls/QSortableGen.class.php - About 5 hrs to fix

    Method RenderImage has 142 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected function RenderImage($strPath = null) {
                $strWidth = $this->Width;
    
                // Make Sure Font File Exists
                if (file_exists($this->strFontNames))
    Severity: Major
    Found in includes/base_controls/QImageLabelBase.class.php - About 5 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                              if ((mb_strpos($strText, '<script', 0, QApplication::$EncodingType) !== false) ||
                                  (mb_strpos($strText, '<applet', 0, QApplication::$EncodingType) !== false) ||
                                  (mb_strpos($strText, '<embed', 0, QApplication::$EncodingType) !== false) ||
                                  (mb_strpos($strText, '<style', 0, QApplication::$EncodingType) !== false) ||
                                  (mb_strpos($strText, '<link', 0, QApplication::$EncodingType) !== false) ||
      Severity: Critical
      Found in includes/base_controls/QTextBoxBase.class.php - About 5 hrs to fix

        QHtmlTableBase has 42 functions (exceeds 20 allowed). Consider refactoring.
        Open

            abstract class QHtmlTableBase extends QPaginatedControl {
                /** @var QAbstractHtmlTableColumn[] */
                protected $objColumnArray = [];
        
                /** @var string|null CSS class to be applied to for even rows */
        Severity: Minor
        Found in includes/base_controls/QHtmlTableBase.class.php - About 5 hrs to fix

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

          <?php
          /**
           * PDO_SqLite3 database driver
           * @package DatabaseAdapters
           * @author Christophe Damour [sigeal at sigeal dot com dot fr]
          Severity: Minor
          Found in includes/database/QSqLite3PdoDatabase.class.php - About 5 hrs to fix

            Function GetAttributes has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function GetAttributes() {
                        $strToReturn = "";
                        $strStyle = "";            
            
                        if (!$this->blnWrap)
            Severity: Minor
            Found in includes/base_controls/QDataGridLegacyColumn.class.php - About 5 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 FilterSetOperand has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
            Open

                    private function FilterSetOperand($mixOperand) {
                        try {
                            if(null === $this->objActiveFilter) {
                                return;
                            } elseif($this->objActiveFilter instanceof QQConditionComparison) {
            Severity: Minor
            Found in includes/base_controls/QDataGridLegacyColumn.class.php - About 5 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 36 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function __set($strName, $mixValue) {
                        switch ($strName) {
                            case 'AlsoResize':
                                $this->mixAlsoResize = $mixValue;
                                $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'alsoResize', $mixValue);
            Severity: Minor
            Found in includes/base_controls/QResizableGen.class.php - About 5 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 QDraggableGen.class.php has 391 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php    
                /**
                 * Triggered when the draggable is created.
                 * 
                 *     * event Type: Event 
            Severity: Minor
            Found in includes/base_controls/QDraggableGen.class.php - About 5 hrs to fix

              QApplicationBase has 40 functions (exceeds 20 allowed). Consider refactoring.
              Open

                  abstract class QApplicationBase extends QBaseClass {
                      //////////////////////////
                      // Public Static Variables
                      //////////////////////////
              
              
              Severity: Minor
              Found in includes/framework/QApplicationBase.class.php - About 5 hrs to fix

                Method Initialize has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public static function Initialize() {
                            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
                
                            // Are we running as CLI?
                            if (PHP_SAPI == 'cli')
                Severity: Major
                Found in includes/framework/QApplicationBase.class.php - About 5 hrs to fix

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

                      _create: function() {
                  
                          var n, i, handle, axis, hname,
                              that = this,
                              o = this.options;
                  Severity: Major
                  Found in assets/js/jquery/jquery-ui.custom.js - About 5 hrs to fix

                    Function qFormat has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function qFormat($strFormat = null) {
                                if ($this->blnDateNull && $this->blnTimeNull) {
                                    return '';
                                }
                    
                    
                    Severity: Minor
                    Found in includes/framework/QDateTime.class.php - About 5 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 35 (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/QDialogGen.class.php - About 5 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 GetObjectValue has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                    Open

                            protected static function GetObjectValue ($mixSpec, $item) {
                                if (is_array($mixSpec)) {
                                    if (is_object($mixSpec[0]) && is_callable($mixSpec)) {
                                        // If its a callable array, then call it
                                        return call_user_func($mixSpec, $item);
                    Severity: Minor
                    Found in includes/base_controls/QHtmlTableColumn.class.php - About 5 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 35 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function __set($strName, $mixValue) {
                                $this->blnModified = true;
                    
                                switch ($strName) {
                                    // APPEARANCE
                    Severity: Minor
                    Found in includes/base_controls/QImageControlBase.class.php - About 5 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 QEmailServer.class.php has 385 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                        /**
                         * This EmailServer (and its dependent EmailMessage class) allows the application to send
                         * messages via any accessible SMTP server.
                         * 
                    Severity: Minor
                    Found in includes/framework/QEmailServer.class.php - About 5 hrs to fix

                      Method __construct has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function __construct($mixFieldData, $objDb = null) {
                                  $this->strName = $mixFieldData->GetColumn('column_name');
                                  $this->strOriginalName = $this->strName;
                                  $this->strTable = $mixFieldData->GetColumn('table_name');
                                  $this->strOriginalTable = $this->strTable;
                      Severity: Major
                      Found in includes/database/QPostgreSqlDatabase.class.php - About 5 hrs to fix

                        File BasicOrmTest.php has 383 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        /**
                         * 
                         * @package Tests
                        Severity: Minor
                        Found in includes/tests/qcubed-unit/BasicOrmTest.php - About 5 hrs to fix

                          Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          jQuery.Callbacks = function( options ) {
                          
                              // Convert options from String-formatted to Object-formatted if needed
                              // (we check in cache first)
                              options = typeof options === "string" ?
                          Severity: Major
                          Found in assets/js/jquery/jquery.js - About 5 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language