qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

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

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'Animate':
                    $this->mixAnimate = $mixValue;
                    $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'animate', $mixValue);
Severity: Minor
Found in includes/base_controls/QSliderGen.class.php - About 2 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 Sort_Click has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

        public function Sort_Click($strFormId, $strControlId, $strParameter) {
            $this->blnModified = true;

            if (strlen($strParameter)) {
                // Sorting
Severity: Minor
Found in includes/base_controls/QDataGridLegacyBase.class.php - About 2 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 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function __set($strName, $mixValue) {
        $this->blnModified = true;

        switch ($strName) {
            // BEHAVIOR
Severity: Minor
Found in includes/base_controls/QPaginatorBase.class.php - About 2 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 testSelectSubsetInExpandAsArray has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function testSelectSubsetInExpandAsArray() {
        $objPersonArray = Person::LoadAll(
            QQ::Clause(
                QQ::Select(QQN::Person()->FirstName),
                QQ::ExpandAsArray(QQN::Person()->Address, QQ::Select(QQN::Person()->Address->Street, QQN::Person()->Address->City)),
Severity: Minor
Found in includes/tests/qcubed-unit/ExpandAsArrayTest.php - About 2 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 ConnectorCreate has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

        public function ConnectorCreate(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn) {
            $strObjectName = $objCodeGen->ModelVariableName($objTable->Name);
            $strControlVarName = $objCodeGen->ModelConnectorVariableName($objColumn);
            $strLabelName = addslashes(QCodeGen::ModelConnectorControlName($objColumn));
            $strPropName = QCodeGen::ModelConnectorPropertyName($objColumn);
Severity: Minor
Found in includes/codegen/controls/QListControlBase_CodeGenerator.class.php - About 2 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 matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
    var bySet = setMatchers.length > 0,
        byElement = elementMatchers.length > 0,
        superMatcher = function( seed, context, xml, results, outermost ) {
            var elem, j, matcher,
Severity: Major
Found in assets/js/jquery/jquery.js - About 2 hrs to fix

    Method BuildQueryStatement has 68 lines of code (exceeds 25 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: Major
    Found in includes/framework/QModelTrait.trait.php - About 2 hrs to fix

      Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function done( status, nativeStatusText, responses, headers ) {
                  var isSuccess, success, error, response, modified,
                      statusText = nativeStatusText;
      
                  // Called once
      Severity: Major
      Found in assets/js/jquery/jquery.js - About 2 hrs to fix

        Function _contactContainers has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _contactContainers: function(event) {
                var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
                    innermostContainer = null,
                    innermostIndex = null;
        
        
        Severity: Major
        Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

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

              _create: function() {
                  this.activeMenu = this.element;
          
                  // Flag used to prevent firing of the click handler
                  // as the event bubbles up through nested menus
          Severity: Major
          Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

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

            <?php
                /**
                 * The exception that is thrown by QType::Cast
                 * if an invalid cast is performed.  InvalidCastException
                 * derives from CallerException, and therefore should be handled
            Severity: Minor
            Found in includes/framework/QType.class.php - About 2 hrs to fix

              Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                  if ( postFilter && !postFilter[ expando ] ) {
                      postFilter = setMatcher( postFilter );
                  }
                  if ( postFinder && !postFinder[ expando ] ) {
              Severity: Major
              Found in assets/js/jquery/jquery.js - About 2 hrs to fix

                Function _generatePosition has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _generatePosition: function( event, constrainPosition ) {
                
                        var containment, co, top, left,
                            o = this.options,
                            scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
                Severity: Major
                Found in assets/js/jquery/jquery-ui.custom.js - About 2 hrs to fix

                  Function updateStyle has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      objWrapper.updateStyle = function(strStyleName, strNewValue) {
                          var objControl = (this.control) ? this.control : this,
                              objNewParentControl,
                              objParentControl,
                              $this;
                  Severity: Major
                  Found in assets/js/qcubed.js - About 2 hrs to fix

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

                            public function __set($strName, $mixValue) {
                                switch ($strName) {
                                    case 'Active':
                                        $this->mixActive = $mixValue;
                                        $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'active', $mixValue);
                    Severity: Major
                    Found in includes/base_controls/QAccordionGen.class.php - About 2 hrs to fix

                      File QModelTrait.trait.php has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /**
                       * Class QModelTrait
                       *
                      Severity: Minor
                      Found in includes/framework/QModelTrait.trait.php - About 2 hrs to fix

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

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

                          Function Load has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public static function Load($strLanguageCode = null, $strCountryCode = null) {
                                  $objLanguageObject = null;
                                  if ($strLanguageCode) {
                                      if ($strCountryCode) {
                                          $strCode = sprintf('%s_%s', $strLanguageCode, $strCountryCode);
                          Severity: Minor
                          Found in includes/framework/QTranslationPoParser.class.php - About 2 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 19 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  public function __construct($strKey = null, $blnBase64 = null, $strCipher = null, $strMode = null,
                                                              $strRandomSource = null) {
                                      if (!function_exists('mcrypt_module_open')) {
                                          throw new QCryptographyException("PHP cryptography components (libmcrypt module) are not installed");
                                      }
                          Severity: Minor
                          Found in includes/framework/QCryptography.legacy.class.php - About 2 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 GetStatement has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  public function GetStatement() {
                                      $this->ProcessClauses();
                          
                                      // SELECT Clause
                                      if ($this->blnCountOnlyFlag) {
                          Severity: Minor
                          Found in includes/framework/QQuery.class.php - About 2 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