qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

Function GetJavascriptCommandArray has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public static function GetJavascriptCommandArray() {

            if (QApplication::$JavascriptExclusiveCommand) {
                // only render this one;
                $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];
Severity: Minor
Found in includes/framework/QApplicationBase.class.php - About 25 mins 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 GetAsManualSqlColumn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetAsManualSqlColumn() {
            if ($this->strTableName)
                return $this->strTableName . '.' . $this->strName;
            else if (($this->objParentNode) && ($this->objParentNode->strTableName))
                return $this->objParentNode->strTableName . '.' . $this->strName;
Severity: Minor
Found in includes/framework/QQuery.class.php - About 25 mins 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 GetColumnAlias has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetColumnAlias(QQueryBuilder $objBuilder) {
            if (count($this->params) == 0) return '';

            $strSql = '(';

Severity: Minor
Found in includes/framework/QQuery.class.php - About 25 mins 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 GetWsdlMessagePart has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetWsdlMessagePart(&$strComplexTypesArray) {
            if ($this->blnArray) {
                try {
                    $strType = QType::SoapType($this->strType);
                    $strArrayTypeName = QSoapService::GetArrayTypeName($strType);
Severity: Minor
Found in includes/framework/QSoapService.class.php - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function __get($strName) {
            switch ($strName) {
                case 'DeltaX': 
                    if ($this->aryOriginalSize) {
                        return $this->aryNewSize['width'] - $this->aryOriginalSize['width'];
Severity: Minor
Found in includes/base_controls/QResizableBase.class.php - About 25 mins 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 AddListItems has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function AddListItems(array $objListItemArray) {
            try {
                $objListItemArray = QType::Cast($objListItemArray, QType::ArrayType);
                if ($objListItemArray) {
                    if (!reset($objListItemArray) instanceof QListItemBase) {
Severity: Minor
Found in includes/base_controls/QListItemManager.trait.php - About 25 mins 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 _indent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function _indent($strText, $intCount = 1) {
    if (!defined('__CODE_GENERATING__') && QApplication::$Minimize) {
        return $strText;
    } else {
        if (defined ('__CODE_GENERATING__')) {
Severity: Minor
Found in includes/base_controls/_utilities.inc.php - About 25 mins 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 RemoveAllDropZones has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function RemoveAllDropZones() {
            QApplication::ExecuteControlCommand($this->strControlId, 'draggable', "option", "revert", "invalid");

            foreach ($this->objDropsControlsArray as $strControlId => $blnValue) {
                if ($blnValue) {
Severity: Minor
Found in includes/base_controls/QBlockControl.class.php - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function MakeJqOptions() {
            $jqOptions = null;
            if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
            if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}
            if (!is_null($val = $this->Items)) {$jqOptions['items'] = $val;}
Severity: Minor
Found in includes/base_controls/QMenuGen.class.php - About 25 mins 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 GetControlHtml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function GetControlHtml() {
            $intItemCount = $this->GetItemCount();
            if (!$intItemCount) return '';

            if ($this->intButtonMode == self::ButtonModeSet || $this->intButtonMode == self::ButtonModeList) {
Severity: Minor
Found in includes/base_controls/QRadioButtonList.class.php - About 25 mins 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 RenderAsHref has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function RenderAsHref($strActionParameter = null, $blnDisplayOutput = true, $strTargetControlId = null) {
            if ($strTargetControlId)
                $this->strTargetControlId = $strTargetControlId;
            else
                $this->strTargetControlId = $this->objForm->GenerateControlId();
Severity: Minor
Found in includes/base_controls/QControlProxy.class.php - About 25 mins 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 SetFilters has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function SetFilters($filters) {
            foreach($this->objColumnArray as $col) {
                if (isset($filters[$col->Name])) {
                    $value = $filters[$col->Name];
                    $col->SetActiveFilterState($value);
Severity: Minor
Found in includes/base_controls/QDataGridLegacyBase.class.php - About 25 mins 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 GetColumnsByName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetColumnsByName($strName) {
            $objColumnArrayToReturn = array();
            if ($this->objColumnArray) {
                foreach ($this->objColumnArray as $objColumn)
                    if ($objColumn->Name == $strName) {
Severity: Minor
Found in includes/base_controls/QDataGridLegacyBase.class.php - About 25 mins 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 RenderActionScripts has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function RenderActionScripts() {
            $strToReturn = $this->callbackString() . " = ";
            if (!count($this->objActionArray)) {
                return $strToReturn . 'null;';
            }
Severity: Minor
Found in includes/base_controls/QJsTimerBase.class.php - About 25 mins 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 GetItemHtml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function GetItemHtml($objItem, $intIndex, $strTabIndex, $blnWrapLabel) {
            $objLabelStyles = new QTagStyler();
            if ($this->objItemStyle) {
                $objLabelStyles->Override($this->objItemStyle); // default style
            }
Severity: Minor
Found in includes/base_controls/QRadioButtonList.class.php - About 25 mins 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 RenderWithError has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function RenderWithError($blnDisplayOutput = true) {
            // Call RenderHelper
            $this->RenderHelper(func_get_args(), __FUNCTION__);

            /**
Severity: Minor
Found in includes/base_controls/QControlBase.class.php - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function __get($strName) {
            switch ($strName) {
                case 'DeltaX': 
                    if ($this->aryOriginalPosition) {
                        return $this->aryNewPosition['left'] - $this->aryOriginalPosition['left'];
Severity: Minor
Found in includes/base_controls/QDraggableBase.class.php - About 25 mins 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 GetColumnByName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetColumnByName($strName) {
            if ($this->objColumnArray) {
                foreach ($this->objColumnArray as $objColumn)
                    if ($objColumn->Name == $strName) {
                        return $objColumn;
Severity: Minor
Found in includes/base_controls/QDataGridLegacyBase.class.php - About 25 mins 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 GetControlHtml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function GetControlHtml() {
            // If no selection is specified, we select the first item, because once we draw this, that is what the browser
            // will consider selected on the screen.
            // We need to make sure that what we draw is mirrored in our current state
            if ($this->SelectionMode == QSelectionMode::Single &&
Severity: Minor
Found in includes/base_controls/QListBoxBase.class.php - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'Headers':
                    try {
                        $this->objTabHeadersArray = QType::Cast($mixValue, QType::ArrayType);
Severity: Minor
Found in includes/base_controls/QTabsBase.class.php - About 25 mins 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