qcubed/framework

View on GitHub
includes/database/QSqlServer2005Database.class.php

Summary

Maintainability
F
1 wk
Test Coverage

Connect accesses the super-global variable $_SERVER.
Open

        public function Connect() {
            // Lookup Adapter-Specific Connection Properties
            $strServer = $this->Server;
            $strName = $this->Database;
            $strUsername = $this->Username;

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Connect accesses the super-global variable $_SERVER.
Open

        public function Connect() {
            // Lookup Adapter-Specific Connection Properties
            $strServer = $this->Server;
            $strName = $this->Database;
            $strUsername = $this->Username;

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

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

<?php
    /**
     * Database Adapter for Microsoft SQL Server 2005/2008
     * Utilizes the native Microsoft SQL Server extension php_sqlsrv.dll version 1.1 (win)
     * http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx
Severity: Major
Found in includes/database/QSqlServer2005Database.class.php - About 1 day to fix

    Function SqlVariable has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                // Are we SqlVariabling a BOOLEAN value?
                if (is_bool($mixData)) {
                    // Yes
                    if ($blnIncludeEquality) {
    Severity: Minor
    Found in includes/database/QSqlServer2005Database.class.php - About 1 day 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 34 (exceeds 5 allowed). Consider refactoring.
    Open

            public function __construct($mixFieldData, $objDb = null) {
                $objDatabaseRow = null;
                try {
                    $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServer2005DatabaseRow');
                } catch (QInvalidCastException $objExc) {
    Severity: Minor
    Found in includes/database/QSqlServer2005Database.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

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

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

      The class QSqlServer2005Database has an overall complexity of 71 which is very high. The configured complexity threshold is 50.
      Open

          class QSqlServer2005Database extends QDatabaseBase {
              const Adapter = 'Microsoft SQL Server 2005/2008 Database Adapter';
      
              protected $objSqlSrvConn;
              protected $objMostRecentStatement; // is always the last executed statement

      Method GetForeignKeysForTable has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function GetForeignKeysForTable($strTableName) {
                  $objForeignKeyArray = array();
      
                  // Use Query to pull the FKs
                  $strQuery = sprintf("
      Severity: Major
      Found in includes/database/QSqlServer2005Database.class.php - About 2 hrs to fix

        Method SqlVariable has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                    // Are we SqlVariabling a BOOLEAN value?
                    if (is_bool($mixData)) {
                        // Yes
                        if ($blnIncludeEquality) {
        Severity: Minor
        Found in includes/database/QSqlServer2005Database.class.php - About 1 hr to fix

          Function SqlLimitVariablePrefix has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

                  public function SqlLimitVariablePrefix($strLimitInfo) {
                      // Setup limit suffix (if applicable) via a TOP clause
                      // Add QCUBED_OFFSET tag if applicable
          
                      if (strlen($strLimitInfo)) {
          Severity: Minor
          Found in includes/database/QSqlServer2005Database.class.php - About 1 hr 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 GetForeignKeysForTable has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

                  public function GetForeignKeysForTable($strTableName) {
                      $objForeignKeyArray = array();
          
                      // Use Query to pull the FKs
                      $strQuery = sprintf("
          Severity: Minor
          Found in includes/database/QSqlServer2005Database.class.php - About 1 hr 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 Connect has 27 lines of code (exceeds 25 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 1 hr to fix

            Function ExecuteQuery has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                    protected function ExecuteQuery($strQuery) {
                        // First, check for QCUBED_OFFSET<#> for LIMIT INFO Offseting
                        if ( ($intPosition = strpos($strQuery, 'QCUBED_OFFSET<')) !== false) {
                            $intEndPosition = strpos($strQuery, '>', $intPosition);
                            if ($intEndPosition === false)
            Severity: Minor
            Found in includes/database/QSqlServer2005Database.class.php - About 45 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

            Avoid too many return statements within this method.
            Open

                            return $strToReturn . 'NULL';
            Severity: Major
            Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                          return '= 0';
              Severity: Major
              Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                        return '0';
                Severity: Major
                Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return $strColumnValue;
                  Severity: Major
                  Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return $strToReturn . sprintf("'%s'", $mixData->qFormat($this->DateFormat));
                    Severity: Major
                    Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return QType::Cast($strColumnValue, QType::Float);
                      Severity: Major
                      Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                                return 'NULL';
                        Severity: Major
                        Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                      return '!= 0';
                          Severity: Major
                          Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return '1';
                            Severity: Major
                            Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return QType::Cast($strColumnValue, QType::Integer);
                              Severity: Major
                              Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return $strToReturn . sprintf('%s', $mixData);
                                Severity: Major
                                Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return $strToReturn . sprintf("'%s'", str_replace("'", "''", $mixData));
                                  Severity: Major
                                  Found in includes/database/QSqlServer2005Database.class.php - About 30 mins to fix

                                    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

                                    The method __construct() has 135 lines of code. Current threshold is set to 100. Avoid really long methods.
                                    Open

                                            public function __construct($mixFieldData, $objDb = null) {
                                                $objDatabaseRow = null;
                                                try {
                                                    $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServer2005DatabaseRow');
                                                } catch (QInvalidCastException $objExc) {

                                    The method __construct() has an NPath complexity of 1778. The configured NPath complexity threshold is 200.
                                    Open

                                            public function __construct($mixFieldData, $objDb = null) {
                                                $objDatabaseRow = null;
                                                try {
                                                    $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServer2005DatabaseRow');
                                                } catch (QInvalidCastException $objExc) {

                                    NPathComplexity

                                    Since: 0.1

                                    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                    Example

                                    class Foo {
                                        function bar() {
                                            // lots of complicated code
                                        }
                                    }

                                    Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                    The method SqlVariable() has an NPath complexity of 600. The configured NPath complexity threshold is 200.
                                    Open

                                            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                                                // Are we SqlVariabling a BOOLEAN value?
                                                if (is_bool($mixData)) {
                                                    // Yes
                                                    if ($blnIncludeEquality) {

                                    NPathComplexity

                                    Since: 0.1

                                    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                    Example

                                    class Foo {
                                        function bar() {
                                            // lots of complicated code
                                        }
                                    }

                                    Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                    The method __construct() has a Cyclomatic Complexity of 45. The configured cyclomatic complexity threshold is 10.
                                    Open

                                            public function __construct($mixFieldData, $objDb = null) {
                                                $objDatabaseRow = null;
                                                try {
                                                    $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServer2005DatabaseRow');
                                                } catch (QInvalidCastException $objExc) {

                                    CyclomaticComplexity

                                    Since: 0.1

                                    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                    Example

                                    // Cyclomatic Complexity = 11
                                    class Foo {
                                    1   public function example() {
                                    2       if ($a == $b) {
                                    3           if ($a1 == $b1) {
                                                    fiddle();
                                    4           } elseif ($a2 == $b2) {
                                                    fiddle();
                                                } else {
                                                    fiddle();
                                                }
                                    5       } elseif ($c == $d) {
                                    6           while ($c == $d) {
                                                    fiddle();
                                                }
                                    7        } elseif ($e == $f) {
                                    8           for ($n = 0; $n < $h; $n++) {
                                                    fiddle();
                                                }
                                            } else {
                                                switch ($z) {
                                    9               case 1:
                                                        fiddle();
                                                        break;
                                    10              case 2:
                                                        fiddle();
                                                        break;
                                    11              case 3:
                                                        fiddle();
                                                        break;
                                                    default:
                                                        fiddle();
                                                        break;
                                                }
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                    The method SqlVariable() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10.
                                    Open

                                            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                                                // Are we SqlVariabling a BOOLEAN value?
                                                if (is_bool($mixData)) {
                                                    // Yes
                                                    if ($blnIncludeEquality) {

                                    CyclomaticComplexity

                                    Since: 0.1

                                    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                    Example

                                    // Cyclomatic Complexity = 11
                                    class Foo {
                                    1   public function example() {
                                    2       if ($a == $b) {
                                    3           if ($a1 == $b1) {
                                                    fiddle();
                                    4           } elseif ($a2 == $b2) {
                                                    fiddle();
                                                } else {
                                                    fiddle();
                                                }
                                    5       } elseif ($c == $d) {
                                    6           while ($c == $d) {
                                                    fiddle();
                                                }
                                    7        } elseif ($e == $f) {
                                    8           for ($n = 0; $n < $h; $n++) {
                                                    fiddle();
                                                }
                                            } else {
                                                switch ($z) {
                                    9               case 1:
                                                        fiddle();
                                                        break;
                                    10              case 2:
                                                        fiddle();
                                                        break;
                                    11              case 3:
                                                        fiddle();
                                                        break;
                                                    default:
                                                        fiddle();
                                                        break;
                                                }
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                    The method GetColumn() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
                                    Open

                                            public function GetColumn($strColumnName, $strColumnType = null) {
                                                if (!isset($this->strColumnArray[$strColumnName])) {
                                                    return null;
                                                }
                                                $strColumnValue = $this->strColumnArray[$strColumnName];

                                    CyclomaticComplexity

                                    Since: 0.1

                                    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                    Example

                                    // Cyclomatic Complexity = 11
                                    class Foo {
                                    1   public function example() {
                                    2       if ($a == $b) {
                                    3           if ($a1 == $b1) {
                                                    fiddle();
                                    4           } elseif ($a2 == $b2) {
                                                    fiddle();
                                                } else {
                                                    fiddle();
                                                }
                                    5       } elseif ($c == $d) {
                                    6           while ($c == $d) {
                                                    fiddle();
                                                }
                                    7        } elseif ($e == $f) {
                                    8           for ($n = 0; $n < $h; $n++) {
                                                    fiddle();
                                                }
                                            } else {
                                                switch ($z) {
                                    9               case 1:
                                                        fiddle();
                                                        break;
                                    10              case 2:
                                                        fiddle();
                                                        break;
                                    11              case 3:
                                                        fiddle();
                                                        break;
                                                    default:
                                                        fiddle();
                                                        break;
                                                }
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strNonQuery' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strNonQuery' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strNonQuery' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $objException = new QSqlServer2005DatabaseException('Unable to connect: ' . $strErrorinformation, $strErrorCode, null);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $objException = new QSqlServer2005DatabaseException('Unable to connect: ' . $strErrorinformation, $strErrorCode, null);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strNonQuery' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strQuery);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorinformation' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Avoid using undefined variables such as '$strErrorCode' which will lead to PHP notices.
                                    Open

                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);

                                    UndefinedVariable

                                    Since: 2.8.0

                                    Detects when a variable is used that has not been defined before.

                                    Example

                                    class Foo
                                    {
                                        private function bar()
                                        {
                                            // $message is undefined
                                            echo $message;
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                    Missing class import via use statement (line '302', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '309', column '38').
                                    Open

                                                $objSqlServerDatabaseResult = new QSqlServer2005DatabaseResult($objResult, $this);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '386', column '32').
                                    Open

                                                    array_push($objFields, new QSqlServer2005DatabaseField($objRow, $this));

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '289', column '16').
                                    Open

                                                        throw new QSqlServer2005DatabaseException('Invalid QCUBED_OFFSET', 0, $strQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '647', column '17').
                                    Open

                                                        return new QDateTime($strColumnValue);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '805', column '17').
                                    Open

                                                            throw new QSqlServer2005DatabaseException('Unsupported DataType: ' . $this->strType, 0, null);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    The method SqlVariable has a boolean flag argument $blnIncludeEquality, which is a certain sign of a Single Responsibility Principle violation.
                                    Open

                                            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {

                                    BooleanArgumentFlag

                                    Since: 1.4.0

                                    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                    Example

                                    class Foo {
                                        public function bar($flag = true) {
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                    Missing class import via use statement (line '261', column '28').
                                    Open

                                                    $objException = new QSqlServer2005DatabaseException('Unable to connect: ' . $strErrorinformation, $strErrorCode, null);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '511', column '26').
                                    Open

                                                    $objForeignKey = new QDatabaseForeignKey(

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '183', column '16').
                                    Open

                                                        throw new Exception('Invalid Backtick in LIMIT Info');

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '214', column '16').
                                    Open

                                                        throw new Exception('Invalid Backtick in ORDER BY Info');

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '197', column '16').
                                    Open

                                                        throw new QSqlServer2005DatabaseException('Invalid Limit Info: ' . $strLimitInfo, 0, null);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '435', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '212', column '16').
                                    Open

                                                        throw new Exception('Invalid Semicolon in ORDER BY Info');

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '181', column '16').
                                    Open

                                                        throw new Exception('Invalid Semicolon in LIMIT Info');

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '413', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '327', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    The method SqlVariable has a boolean flag argument $blnReverseEquality, which is a certain sign of a Single Responsibility Principle violation.
                                    Open

                                            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {

                                    BooleanArgumentFlag

                                    Since: 1.4.0

                                    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                    Example

                                    class Foo {
                                        public function bar($flag = true) {
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                    Missing class import via use statement (line '556', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '424', column '15').
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '597', column '16').
                                    Open

                                                    return new QSqlServer2005DatabaseRow($strColumnArray);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '451', column '21').
                                    Open

                                                    $objIndex = new QDatabaseIndex($strKeyName, $blnPrimaryKey, $blnUnique, $strColumnNameArray);

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    Missing class import via use statement (line '487', column '28').
                                    Open

                                                            $objForeignKey = new QDatabaseForeignKey(

                                    MissingImport

                                    Since: 2.7.0

                                    Importing all external classes in a file through use statements makes them clearly visible.

                                    Example

                                    function make() {
                                        return new \stdClass();
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                                    The method SqlVariable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                        } else {
                                                            // Check against NULL, True then False
                                                            if (is_null($mixData))
                                                                return 'IS NULL';
                                                            else if ($mixData)

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid using static access to class 'QType' in method 'GetColumn'.
                                    Open

                                                        return QType::Cast($strColumnValue, QType::Integer);

                                    StaticAccess

                                    Since: 1.4.0

                                    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                    Example

                                    class Foo
                                    {
                                        public function bar()
                                        {
                                            Bar::baz();
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#staticaccess

                                    Avoid using static access to class 'QType' in method 'GetColumn'.
                                    Open

                                                        return QType::Cast($strColumnValue, QType::String);

                                    StaticAccess

                                    Since: 1.4.0

                                    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                    Example

                                    class Foo
                                    {
                                        public function bar()
                                        {
                                            Bar::baz();
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#staticaccess

                                    The method SqlVariable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                    } else {
                                                        // Check against NULL, True then False
                                                        if (is_null($mixData))
                                                            return 'NULL';
                                                        else if ($mixData)

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid using static access to class 'QType' in method 'ExecuteQuery'.
                                    Open

                                                    $intOffset = QType::Cast(substr($strQuery,
                                                        $intPosition + 13 /* len of QCUBED_OFFSET< */,
                                                        $intEndPosition - $intPosition - 13), QType::Integer);

                                    StaticAccess

                                    Since: 1.4.0

                                    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                    Example

                                    class Foo
                                    {
                                        public function bar()
                                        {
                                            Bar::baz();
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#staticaccess

                                    The method SqlVariable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                    } else {
                                                        if (is_null($mixData))
                                                            $strToReturn = 'IS ';
                                                        else
                                                            $strToReturn = '= ';

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid assigning values to variables in if clauses and the like (line '286', column '10').
                                    Open

                                            protected function ExecuteQuery($strQuery) {
                                                // First, check for QCUBED_OFFSET<#> for LIMIT INFO Offseting
                                                if ( ($intPosition = strpos($strQuery, 'QCUBED_OFFSET<')) !== false) {
                                                    $intEndPosition = strpos($strQuery, '>', $intPosition);
                                                    if ($intEndPosition === false)

                                    IfStatementAssignment

                                    Since: 2.7.0

                                    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($foo = 'bar') { // possible typo
                                                // ...
                                            }
                                            if ($baz = 0) { // always false
                                                // ...
                                            }
                                        }
                                    }

                                    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                    The method __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                            else {
                                                                $this->strType = QDatabaseFieldType::Blob;
                                                                $this->intMaxLength = null;
                                                            }

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    The method SqlLimitVariablePrefix uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                    } else {
                                                        throw new QSqlServer2005DatabaseException('Invalid Limit Info: ' . $strLimitInfo, 0, null);
                                                    }

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid using static access to class 'QType' in method 'GetColumn'.
                                    Open

                                                        return QType::Cast($strColumnValue, QType::Float);

                                    StaticAccess

                                    Since: 1.4.0

                                    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                    Example

                                    class Foo
                                    {
                                        public function bar()
                                        {
                                            Bar::baz();
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#staticaccess

                                    The method __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                } else {
                                                    // Passed in fielddata is a sqlsrv_fetch_field field result
                                                    $this->strName = $mixFieldData->name;
                                                    $this->strOriginalName = $mixFieldData->name;
                                                    $this->strTable = $mixFieldData->column_source;

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid using static access to class 'QType' in method '__construct'.
                                    Open

                                                    $objDatabaseRow = QType::Cast($mixFieldData, 'QSqlServer2005DatabaseRow');

                                    StaticAccess

                                    Since: 1.4.0

                                    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                    Example

                                    class Foo
                                    {
                                        public function bar()
                                        {
                                            Bar::baz();
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#staticaccess

                                    Avoid unused parameters such as '$strColumnName'.
                                    Open

                                            public function InsertId($strTableName = null, $strColumnName = null) {

                                    UnusedFormalParameter

                                    Since: 0.2

                                    Avoid passing parameters to methods or constructors and then not using those parameters.

                                    Example

                                    class Foo
                                    {
                                        private function bar($howdy)
                                        {
                                            // $howdy is not used
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

                                    Avoid using empty try-catch blocks in __construct.
                                    Open

                                                } catch (QInvalidCastException $objExc) {
                                                }

                                    EmptyCatchBlock

                                    Since: 2.7.0

                                    Usually empty try-catch is a bad idea because you are silently swallowing an error condition and then continuing execution. Occasionally this may be the right thing to do, but often it's a sign that a developer saw an exception, didn't know what to do about it, and so used an empty catch to silence the problem.

                                    Example

                                    class Foo {
                                    
                                      public function bar()
                                      {
                                          try {
                                              // ...
                                          } catch (Exception $e) {} // empty catch block
                                      }
                                    }

                                    Source https://phpmd.org/rules/design.html#emptycatchblock

                                    Avoid unused local variables such as '$strNonQuery'.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$strNonQuery'.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused parameters such as '$strLimitInfo'.
                                    Open

                                            public function SqlLimitVariableSuffix($strLimitInfo) {

                                    UnusedFormalParameter

                                    Since: 0.2

                                    Avoid passing parameters to methods or constructors and then not using those parameters.

                                    Example

                                    class Foo
                                    {
                                        private function bar($howdy)
                                        {
                                            // $howdy is not used
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

                                    Avoid unused local variables such as '$intTableId'.
                                    Open

                                                    $intTableId = $objDatabaseRow->GetColumn('object_id');

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$strNonQuery'.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused parameters such as '$strTableName'.
                                    Open

                                            public function InsertId($strTableName = null, $strColumnName = null) {

                                    UnusedFormalParameter

                                    Since: 0.2

                                    Avoid passing parameters to methods or constructors and then not using those parameters.

                                    Example

                                    class Foo
                                    {
                                        private function bar($howdy)
                                        {
                                            // $howdy is not used
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

                                    Avoid unused local variables such as '$strNonQuery'.
                                    Open

                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$strErrorInformation'.
                                    Open

                                                    $strErrorInformation     = '';

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            public function GetForeignKeysForTable($strTableName) {
                                                $objForeignKeyArray = array();
                                    
                                                // Use Query to pull the FKs
                                                $strQuery = sprintf("
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 1 other location - About 1 day to fix
                                    includes/database/QSqlServerDatabase.class.php on lines 383..462

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 296.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                        class QSqlServer2005DatabaseRow extends QDatabaseRowBase {
                                            protected $strColumnArray;
                                    
                                            public function __construct($strColumnArray) {
                                                $this->strColumnArray = $strColumnArray;
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 1 other location - About 1 day to fix
                                    includes/database/QSqlServerDatabase.class.php on lines 543..603

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 256.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            public function SqlLimitVariablePrefix($strLimitInfo) {
                                                // Setup limit suffix (if applicable) via a TOP clause
                                                // Add QCUBED_OFFSET tag if applicable
                                    
                                                if (strlen($strLimitInfo)) {
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 1 other location - About 6 hrs to fix
                                    includes/database/QSqlServerDatabase.class.php on lines 120..147

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 211.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            public function GetIndexesForTable($strTableName) {
                                                $objIndexArray = array();
                                    
                                                // Use sp_helpindex to pull the indexes
                                                $objResult = $this->Query(sprintf("EXEC sp_helpindex %s", $this->SqlVariable($strTableName)));
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 1 other location - About 5 hrs to fix
                                    includes/database/QSqlServerDatabase.class.php on lines 364..381

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 192.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                                if ( ($intPosition = strpos($strQuery, 'QCUBED_OFFSET<')) !== false) {
                                                    $intEndPosition = strpos($strQuery, '>', $intPosition);
                                                    if ($intEndPosition === false)
                                                        throw new QSqlServer2005DatabaseException('Invalid QCUBED_OFFSET', 0, $strQuery);
                                                    $intOffset = QType::Cast(substr($strQuery,
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 1 other location - About 4 hrs to fix
                                    includes/database/QSqlServerDatabase.class.php on lines 233..242

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 167.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 5 locations. Consider refactoring.
                                    Open

                                            public function GetFieldsForTable($strTableName) {
                                                $strTableName = $this->SqlVariable($strTableName);
                                    
                                                $strQuery = sprintf("
                                                    SELECT  col.*
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 4 other locations - About 45 mins to fix
                                    includes/database/QInformixPdoDatabase.class.php on lines 269..309
                                    includes/database/QPostgreSqlDatabase.class.php on lines 274..308
                                    includes/database/QPostgreSqlPdoDatabase.class.php on lines 210..240
                                    includes/database/QSqlServerDatabase.class.php on lines 311..336

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 96.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                    Open

                                            public function SqlSortByVariable($strSortByInfo) {
                                                // Setup sorting information (if applicable) via a ORDER BY clause
                                                if (strlen($strSortByInfo)) {
                                                    if (strpos($strSortByInfo, ';') !== false)
                                                        throw new Exception('Invalid Semicolon in ORDER BY Info');
                                    Severity: Major
                                    Found in includes/database/QSqlServer2005Database.class.php and 7 other locations - About 45 mins to fix
                                    includes/database/QInformixPdoDatabase.class.php on lines 220..232
                                    includes/database/QMySqliDatabase.class.php on lines 28..39
                                    includes/database/QMySqliDatabase.class.php on lines 41..53
                                    includes/database/QOracleDatabase.class.php on lines 60..72
                                    includes/database/QPostgreSqlDatabase.class.php on lines 151..163
                                    includes/database/QPostgreSqlPdoDatabase.class.php on lines 188..200
                                    includes/database/QSqlServerDatabase.class.php on lines 153..165

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 96.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Avoid excessively long variable names like $strEscapeIdentifierEnd. Keep variable name length under 20.
                                    Open

                                            protected $strEscapeIdentifierEnd = ']';

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $objSqlServerDatabaseResult. Keep variable name length under 20.
                                    Open

                                                $objSqlServerDatabaseResult = new QSqlServer2005DatabaseResult($objResult, $this);

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $objMostRecentStatement. Keep variable name length under 20.
                                    Open

                                            protected $objMostRecentStatement; // is always the last executed statement

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $strReferenceTableName. Keep variable name length under 20.
                                    Open

                                                                $strReferenceTableName,

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $strEscapeIdentifierBegin. Keep variable name length under 20.
                                    Open

                                            protected $strEscapeIdentifierBegin = '[';

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $strReferenceColumnNameArray. Keep variable name length under 20.
                                    Open

                                                                $strReferenceColumnNameArray);

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $strConnectionInfoArray. Keep variable name length under 20.
                                    Open

                                                $strConnectionInfoArray = array(

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Constant Adapter should be defined in uppercase
                                    Open

                                            const Adapter = 'Microsoft SQL Server 2005/2008 Database Adapter';

                                    ConstantNamingConventions

                                    Since: 0.2

                                    Class/Interface constant names should always be defined in uppercase.

                                    Example

                                    class Foo {
                                        const MY_NUM = 0; // ok
                                        const myTest = ""; // fail
                                    }

                                    Source https://phpmd.org/rules/naming.html#constantnamingconventions

                                    The method GetErrorInformation is not named in camelCase.
                                    Open

                                            private function GetErrorInformation(&$strError, &$strLastErrorCode) {
                                                $strError = '';
                                                $strLastErrorCode = '';
                                    
                                                // Determine only the errorinformation

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ColumnExists is not named in camelCase.
                                    Open

                                            public function ColumnExists($strColumnName) {
                                                return array_key_exists($strColumnName, $this->strColumnArray);
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetFieldsForTable is not named in camelCase.
                                    Open

                                            public function GetFieldsForTable($strTableName) {
                                                $strTableName = $this->SqlVariable($strTableName);
                                    
                                                $strQuery = sprintf("
                                                    SELECT  col.*

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ExecuteTransactionBegin is not named in camelCase.
                                    Open

                                            protected function ExecuteTransactionBegin() {
                                                if (sqlsrv_begin_transaction($this->objSqlSrvConn) === false) {
                                                    // Determine the errorinformation
                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);
                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method InsertId is not named in camelCase.
                                    Open

                                            public function InsertId($strTableName = null, $strColumnName = null) {
                                                $strQuery = 'SELECT SCOPE_IDENTITY();';
                                                $objResult = $this->Query($strQuery);
                                                $objRow = $objResult->FetchRow();
                                                return $objRow[0];

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method Close is not named in camelCase.
                                    Open

                                            public function Close() {
                                                sqlsrv_close($this->objSqlSrvConn);
                                    
                                                // Update Connected Flag
                                                $this->blnConnectedFlag = false;

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method FetchField is not named in camelCase.
                                    Open

                                            public function FetchField() {
                                                return null;  // Not used
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ExecuteTransactionRollBack is not named in camelCase.
                                    Open

                                            protected function ExecuteTransactionRollBack() {
                                                if (sqlsrv_rollback($this->objSqlSrvConn) === false) {
                                                    // Determine the errorinformation
                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);
                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method Close is not named in camelCase.
                                    Open

                                            public function Close() {
                                                sqlsrv_free_stmt($this->objSqlSrvResult);
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetNextRow is not named in camelCase.
                                    Open

                                            public function GetNextRow() {
                                                $strColumnArray = $this->FetchArray();
                                    
                                                if (!is_null($strColumnArray))
                                                    return new QSqlServer2005DatabaseRow($strColumnArray);

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetRows is not named in camelCase.
                                    Open

                                            public function GetRows() {
                                                $objDbRowArray = array();
                                                while ($objDbRow = $this->GetNextRow())
                                                    array_push($objDbRowArray, $objDbRow);
                                                return $objDbRowArray;

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetColumn is not named in camelCase.
                                    Open

                                            public function GetColumn($strColumnName, $strColumnType = null) {
                                                if (!isset($this->strColumnArray[$strColumnName])) {
                                                    return null;
                                                }
                                                $strColumnValue = $this->strColumnArray[$strColumnName];

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ExecuteNonQuery is not named in camelCase.
                                    Open

                                            protected function ExecuteNonQuery($strNonQuery) {
                                                // Perform the NonQuery
                                                $objResult = sqlsrv_query($this->objSqlSrvConn, $strNonQuery, NULL, $this->mixedOptionsArray);
                                                if ($objResult === false) {
                                                    // Determine the errorinformation

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method Connect is not named in camelCase.
                                    Open

                                            public function Connect() {
                                                // Lookup Adapter-Specific Connection Properties
                                                $strServer = $this->Server;
                                                $strName = $this->Database;
                                                $strUsername = $this->Username;

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method FetchArray is not named in camelCase.
                                    Open

                                            public function FetchArray() {
                                                $strColumnArray = sqlsrv_fetch_array($this->objSqlSrvResult);
                                                if ($strColumnArray === false) {
                                                    // Determine the errorinformation
                                                    $strErrorInformation     = '';

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method CountFields is not named in camelCase.
                                    Open

                                            public function CountFields() {
                                                return sqlsrv_num_fields($this->objSqlSrvResult);
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetColumnNameArray is not named in camelCase.
                                    Open

                                            public function GetColumnNameArray() {
                                                return $this->strColumnArray;
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetTables is not named in camelCase.
                                    Open

                                            public function GetTables() {
                                                $objResult = $this->Query("
                                                    SELECT  obj.name
                                                    FROM    sys.objects obj
                                                    WHERE   obj.type = 'U' AND

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method CountRows is not named in camelCase.
                                    Open

                                            public function CountRows() {
                                                return sqlsrv_num_rows($this->objSqlSrvResult);
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ExecuteTransactionCommit is not named in camelCase.
                                    Open

                                            protected function ExecuteTransactionCommit() {
                                                if (sqlsrv_commit($this->objSqlSrvConn) === false) {
                                                    // Determine the errorinformation
                                                    $this->GetErrorInformation($strErrorinformation, $strErrorCode);
                                                    throw new QSqlServer2005DatabaseException($strErrorinformation, $strErrorCode, $strNonQuery);

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method FetchRow is not named in camelCase.
                                    Open

                                            public function FetchRow() {
                                                return sqlsrv_fetch_array($this->objSqlSrvResult, SQLSRV_FETCH_NUMERIC);
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method SqlLimitVariablePrefix is not named in camelCase.
                                    Open

                                            public function SqlLimitVariablePrefix($strLimitInfo) {
                                                // Setup limit suffix (if applicable) via a TOP clause
                                                // Add QCUBED_OFFSET tag if applicable
                                    
                                                if (strlen($strLimitInfo)) {

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetTableForId is not named in camelCase.
                                    Open

                                            public function GetTableForId($intTableId) {
                                                $intTableId = $this->SqlVariable($intTableId);
                                                $strQuery = sprintf('
                                                    SELECT  obj.name
                                                    FROM    sys.objects obj

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetForeignKeysForTable is not named in camelCase.
                                    Open

                                            public function GetForeignKeysForTable($strTableName) {
                                                $objForeignKeyArray = array();
                                    
                                                // Use Query to pull the FKs
                                                $strQuery = sprintf("

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method SqlSortByVariable is not named in camelCase.
                                    Open

                                            public function SqlSortByVariable($strSortByInfo) {
                                                // Setup sorting information (if applicable) via a ORDER BY clause
                                                if (strlen($strSortByInfo)) {
                                                    if (strpos($strSortByInfo, ';') !== false)
                                                        throw new Exception('Invalid Semicolon in ORDER BY Info');

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method SqlLimitVariableSuffix is not named in camelCase.
                                    Open

                                            public function SqlLimitVariableSuffix($strLimitInfo) {
                                                return null;
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method GetIndexesForTable is not named in camelCase.
                                    Open

                                            public function GetIndexesForTable($strTableName) {
                                                $objIndexArray = array();
                                    
                                                // Use sp_helpindex to pull the indexes
                                                $objResult = $this->Query(sprintf("EXEC sp_helpindex %s", $this->SqlVariable($strTableName)));

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method SqlVariable is not named in camelCase.
                                    Open

                                            public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {
                                                // Are we SqlVariabling a BOOLEAN value?
                                                if (is_bool($mixData)) {
                                                    // Yes
                                                    if ($blnIncludeEquality) {

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method ExecuteQuery is not named in camelCase.
                                    Open

                                            protected function ExecuteQuery($strQuery) {
                                                // First, check for QCUBED_OFFSET<#> for LIMIT INFO Offseting
                                                if ( ($intPosition = strpos($strQuery, 'QCUBED_OFFSET<')) !== false) {
                                                    $intEndPosition = strpos($strQuery, '>', $intPosition);
                                                    if ($intEndPosition === false)

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    The method FetchFields is not named in camelCase.
                                    Open

                                            public function FetchFields() {
                                                return null;  // Not used
                                            }

                                    CamelCaseMethodName

                                    Since: 0.2

                                    It is considered best practice to use the camelCase notation to name methods.

                                    Example

                                    class ClassName {
                                        public function get_name() {
                                        }
                                    }

                                    Source

                                    There are no issues that match your filters.

                                    Category
                                    Status