qcubed/framework

View on GitHub

Showing 2,378 of 15,774 total issues

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

        public function Connect() {
            // Lookup Adapter-Specific Connection Properties
            $strServer = $this->Server;
            $strName = $this->Database;
            $strUsername = $this->Username;
Severity: Minor
Found in includes/database/QMySqlDatabase.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 GetColumnsForConstraint has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetColumnsForConstraint($intConstraintId, $intTableId){
            $strColumnNameArray = array();
            $strQuery = sprintf("
                            SELECT a.constrid, b.* 
                                FROM sysconstraints a, sysindexes b 
Severity: Minor
Found in includes/database/QInformixPdoDatabase.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 ExecuteNonQuery has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function ExecuteNonQuery($strNonQuery) {

        // Connect if Applicable
        if (!$this->blnConnectedFlag) $this->Connect();
        
Severity: Minor
Found in includes/database/QOracleDatabase.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 Connect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function Connect() {
            // Lookup Adapter-Specific Connection Properties
            $strServer = $this->Server;
            $strName = $this->Database;
            $strUsername = $this->Username;
Severity: Minor
Found in includes/database/QSqlServer2005Database.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 Literal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public static function Literal($mixColValue) {
            if (is_null($mixColValue)) return 'null';
             elseif (is_integer($mixColValue)) return $mixColValue;
            elseif (is_bool($mixColValue)) return ($mixColValue ? 'true' : 'false');
            elseif (is_float($mixColValue)) return "(float)$mixColValue";
Severity: Minor
Found in includes/codegen/QTypeTable.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($strColumnName) {
            if ($this->objColumnArray) {
                foreach ($this->objColumnArray as $objColumn){
                    if ($objColumn->Name == $strColumnName)
                        return $objColumn;
Severity: Minor
Found in includes/codegen/QSqlTable.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 ConnectorCreate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function ConnectorCreate(QCodeGenBase $objCodeGen, QSqlTable $objTable, $objColumn) {
            $strObjectName = $objCodeGen->ModelVariableName($objTable->Name);
            $strClassName = $objTable->ClassName;
            $strControlVarName = $objCodeGen->ModelConnectorVariableName($objColumn);
            $strLabelName = addslashes(QCodeGen::ModelConnectorControlName($objColumn));
Severity: Minor
Found in includes/codegen/controls/QTextBoxBase_CodeGenerator.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($strUrl, $strJqClass = null, $strJqSetupFunc = null, $strQcClass = null, $strQcBaseClass = 'QPanel')
    {
        $this->hasDisabledProperty = false;
        $html = file_get_html($strUrl);

Severity: Minor
Found in assets/php/_devtools/jquery_ui_gen/jq_control_gen.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) {
            $this->blnModified = true;

            switch ($strName) {

Severity: Minor
Found in install/project/includes/controls/QImageFileAsset.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 btnCalculate_Click has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function btnCalculate_Click($strFormId, $strControlId, $strParameter) {
        switch ($this->lstOperation->SelectedValue) {
            case 'add':
                $mixResult = $this->txtValue1->Text + $this->txtValue2->Text;
                break;
Severity: Minor
Found in assets/php/examples/basic_ajax/calculator_2.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 btnCalculate_Click has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function btnCalculate_Click($strFormId, $strControlId, $strParameter) {
        switch ($this->lstOperation->SelectedValue) {
            case 'add':
                $mixResult = $this->txtValue1->Text + $this->txtValue2->Text;
                break;
Severity: Minor
Found in assets/php/examples/basic_qform/calculator_2.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($strUrl, $strJqClass = null, $strJqSetupFunc = null, $strQcClass = null, $strQcBaseClass = 'QPanel')
    {
        $this->hasDisabledProperty = false;
        $html = file_get_html($strUrl);

Severity: Minor
Found in assets/php/_devtools/jquery_ui_gen/jq_control_gen-v1.9.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 chkSelected_Click has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function chkSelected_Click($strFormId, $strControlId, $params) {
            $blnChecked = $params['checked'];

            // The database record primary key is embedded after the last underscore in the id of the checkbox
            $idItems = explode('_', $params['id']);
Severity: Minor
Found in assets/php/examples/datagrid/qcheckboxcolumn.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 php_value has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    static public function php_value($jsValue) {
        //todo: add proper parsing
        $jsValue = trim($jsValue);
        if (!$jsValue)
            return null;
Severity: Minor
Found in assets/php/_devtools/jquery_ui_gen/jq_control.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 btnCalculate_Click has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function btnCalculate_Click($strFormId, $strControlId, $strParameter) {
        switch ($this->lstOperation->SelectedValue) {
            case 'add':
                $mixResult = $this->txtValue1->Text + $this->txtValue2->Text;
                break;
Severity: Minor
Found in assets/php/examples/basic_qform/calculator_3.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function __construct($strUrl, $strJqClass = null, $strJqSetupFunc = null, $strQcClass = null, $strQcBaseClass = 'QPanel')
    {
        $this->hasDisabledProperty = false;
        $html = file_get_html($strUrl);

Severity: Minor
Found in assets/php/_devtools/jquery_ui_gen/jq_control_gen-1.10.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 Form_Create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function Form_Create() {
        // Define our Label
        $this->lblMessage = new QLabel($this);
        $this->lblMessage->Text = '<None>';

Severity: Minor
Found in assets/php/examples/basic_qform/listbox.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 Form_Create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function Form_Create() {

            $count = 10000;
            Project::ClearCache();
            Person::ClearCache();
Severity: Minor
Found in assets/php/tests/db_speed.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