qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Method GetControlHtml has 163 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected function GetControlHtml() {
            // Ignore Class
            $strCssClass = $this->strCssClass;
            $this->strCssClass = '';
            $strAttributes = $this->GetAttributes();
Severity: Major
Found in includes/base_controls/QDateTimePicker.class.php - About 6 hrs to fix

    QCodeGenBase has 47 functions (exceeds 20 allowed). Consider refactoring.
    Open

        abstract class QCodeGenBase extends QBaseClass {
            // Class Name Suffix/Prefix
            /** @var string Class Prefix, as specified in the codegen_settings.xml file */
            protected $strClassPrefix;
            /** @var string Class suffix, as specified in the codegen_settings.xml file */
    Severity: Minor
    Found in includes/codegen/QCodeGenBase.class.php - About 6 hrs to fix

      Function extractZip has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function extractZip($archive, $destination) {
              if (!function_exists('zip_open')) {
                  throw new Exception("ZIP extension is not enabled on this installation of PHP. Recompile your installation of PHP with --enable-zip parameter.");
              }
              
      Severity: Minor
      Found in includes/framework/QArchive.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 RenderImage has 160 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function RenderImage($strPath = null) {
                  if (!$this->strImagePath)
                      throw new QCallerException('No Image Path was set');
      
                  // Flow Through if No Size Information
      Severity: Major
      Found in includes/base_controls/QImageControlBase.class.php - About 6 hrs to fix

        Function registerControl has 157 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        qcubed.registerControl = function(mixControl) {
            var objControl = qcubed.getControl(mixControl),
                objWrapper;
        
            if (!objControl) {
        Severity: Major
        Found in assets/js/qcubed.js - About 6 hrs to fix

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

                  public function __set($strName, $mixValue) {
                      switch ($strName) {
                          // APPEARANCE
                          case "Noun":
                              try {
          Severity: Minor
          Found in includes/base_controls/QPaginatedControl.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 41 (exceeds 5 allowed). Consider refactoring.
          Open

                  public function __construct($mixFieldData, $objDb = null) {
                      $objDatabaseRow = null;
                      try {
                          $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServerDatabaseRow');
                      } catch (QInvalidCastException $objExc) {
          Severity: Minor
          Found in includes/database/QSqlServerDatabase.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 PageLinks has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
          Open

                  public static function PageLinks() {
                      $strPrevious = null;
                      $strNext = null;
                      $blnFound = false;
          
          
          Severity: Minor
          Found in assets/php/examples/includes/examples.inc.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 size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var effectSize = $.effects.effect.size = function( o, done ) {
          
              // Create element
              var original, baseline, factor,
                  el = $( this ),
          Severity: Major
          Found in assets/js/jquery/jquery-ui.custom.js - About 6 hrs to fix

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

                    public function __set($strName, $mixValue) {
                        switch ($strName) {
                            case 'AlsoResize':
                                $this->mixAlsoResize = $mixValue;
                                $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'alsoResize', $mixValue);
            Severity: Major
            Found in includes/base_controls/QResizableGen.class.php - About 6 hrs to fix

              Function RenderTable has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
              Open

                      public static function RenderTable(array $data, $strFields = null, $attributes = null, $strHeaderTitles = null, $intHeaderColumnCount = 0, $blnHtmlEntities = true) {
                          if (!$data) {
                              return '';
                          }
              
              
              Severity: Minor
              Found in includes/framework/QHtml.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 __get has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function __get($strName) {
                          switch ($strName) {
                              // APPEARANCE
                              case "AlternateRowStyle": return $this->objAlternateRowStyle;
                              case "HeaderRowStyle": return $this->objHeaderRowStyle;
              Severity: Minor
              Found in includes/base_controls/QDataGridLegacyBase.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 __set has 151 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/QDialogGen.class.php - About 6 hrs to fix

                QDataGridLegacyBase has 44 functions (exceeds 20 allowed). Consider refactoring.
                Open

                    abstract class QDataGridLegacyBase extends QPaginatedControl {
                        // APPEARANCE
                        /** @var null|QDataGridLegacyRowStyle Row style for alternate rows */
                        protected $objAlternateRowStyle = null;
                        /** @var null|QDataGridLegacyRowStyle Style for the top row (not the filter row) */
                Severity: Minor
                Found in includes/base_controls/QDataGridLegacyBase.class.php - About 6 hrs to fix

                  Function parseDate has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      parseDate: function (format, value, settings) {
                          if (format == null || value == null) {
                              throw "Invalid arguments";
                          }
                  
                  
                  Severity: Major
                  Found in assets/js/jquery/jquery-ui.custom.js - About 5 hrs to fix

                    Function RenderEnd has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function RenderEnd($blnDisplayOutput = true) {
                                // Ensure that RenderEnd() has not yet been called
                                switch ($this->intFormStatus) {
                                    case QFormBase::FormStatusUnrendered:
                                        throw new QCallerException('$this->RenderBegin() was never called');
                    Severity: Minor
                    Found in includes/base_controls/QFormBase.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 position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.fn.position = function( options ) {
                        if ( !options || !options.of ) {
                            return _position.apply( this, arguments );
                        }
                    
                    
                    Severity: Major
                    Found in assets/js/jquery/jquery-ui.custom.js - About 5 hrs to fix

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

                              public function __construct($mixFieldData, $objDb = null) {
                                  $objDatabaseRow = null;
                                  try {
                                      $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServerDatabaseRow');
                                  } catch (QInvalidCastException $objExc) {
                      Severity: Major
                      Found in includes/database/QSqlServerDatabase.class.php - About 5 hrs to fix

                        Method Form_Create has 144 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                protected function Form_Create() {
                                    $this->Draggable = new QPanel($this);
                                    $this->Draggable->Text = 'Drag me';
                                    $this->Draggable->CssClass = 'draggable';
                                    $this->Draggable->Moveable = true;
                        Severity: Major
                        Found in assets/php/examples/other_controls/jq_example.php - About 5 hrs to fix

                          Function Init has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  public static function Init() {
                                      $intIndex = -1;
                          
                                      $intIndex++;
                                      Examples::$Categories[$intIndex] = array();
                          Severity: Minor
                          Found in assets/php/examples/includes/examples.inc.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

                          Severity
                          Category
                          Status
                          Source
                          Language