qcubed/framework

View on GitHub
includes/framework/QApplicationBase.class.php

Summary

Maintainability
F
1 wk
Test Coverage

QueryString accesses the super-global variable $_GET.
Open

        public static function QueryString($strItem) {
            if (array_key_exists($strItem, $_GET))
                return $_GET[$strItem];
            else
                return null;

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

IsRemoteAdminSession accesses the super-global variable $_SERVER.
Open

        public static function IsRemoteAdminSession() {
            // Allow Remote?
            if (ALLOW_REMOTE_ADMIN === true)
                return false;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

IsRemoteAdminSession accesses the super-global variable $_SERVER.
Open

        public static function IsRemoteAdminSession() {
            // Allow Remote?
            if (ALLOW_REMOTE_ADMIN === true)
                return false;

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

IsRemoteAdminSession accesses the super-global variable $_SERVER.
Open

        public static function IsRemoteAdminSession() {
            // Allow Remote?
            if (ALLOW_REMOTE_ADMIN === true)
                return false;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

GenerateQueryString accesses the super-global variable $_GET.
Open

        public static function GenerateQueryString($arr = null) {
            if(null === $arr)
                $arr = $_GET;
            if (count($arr)) {
                $strToReturn = '';

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

IsRemoteAdminSession accesses the super-global variable $_SERVER.
Open

        public static function IsRemoteAdminSession() {
            // Allow Remote?
            if (ALLOW_REMOTE_ADMIN === true)
                return false;

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

Redirect accesses the super-global variable $_POST.
Open

        public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

            if (!$blnAbortCurrentScript) {
                // Use the javascript command mechanism
                QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

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

IsRemoteAdminSession accesses the super-global variable $_SERVER.
Open

        public static function IsRemoteAdminSession() {
            // Allow Remote?
            if (ALLOW_REMOTE_ADMIN === true)
                return false;

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

Redirect accesses the super-global variable $_SERVER.
Open

        public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

            if (!$blnAbortCurrentScript) {
                // Use the javascript command mechanism
                QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Redirect accesses the super-global variable $_SERVER.
Open

        public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

            if (!$blnAbortCurrentScript) {
                // Use the javascript command mechanism
                QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

QueryString accesses the super-global variable $_GET.
Open

        public static function QueryString($strItem) {
            if (array_key_exists($strItem, $_GET))
                return $_GET[$strItem];
            else
                return null;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

DeleteCookie accesses the super-global variable $_COOKIE.
Open

        public static function DeleteCookie($strName) {
            if (isset($_COOKIE[$strName])) { // don't post a cookie if its not set
                $dttTimeout = QDateTime::Now();
                $dttTimeout->AddYears(-5);

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Redirect accesses the super-global variable $_POST.
Open

        public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

            if (!$blnAbortCurrentScript) {
                // Use the javascript command mechanism
                QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

CheckRemoteAdmin accesses the super-global variable $_SERVER.
Open

        public static function CheckRemoteAdmin() {
            if (!QApplication::IsRemoteAdminSession()) {
                return;
            }

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

Initialize accesses the super-global variable $_SERVER.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')

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

Function Initialize has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

        public static function Initialize() {
            self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;

            // Are we running as CLI?
            if (PHP_SAPI == 'cli')
Severity: Minor
Found in includes/framework/QApplicationBase.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

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

<?php
    /**
     * This abstract class should never be instantiated.  It contains static methods,
     * variables and constants to be used throughout the application.
     *
Severity: Major
Found in includes/framework/QApplicationBase.class.php - About 1 day to fix

    QApplicationBase has 40 functions (exceeds 20 allowed). Consider refactoring.
    Open

        abstract class QApplicationBase extends QBaseClass {
            //////////////////////////
            // Public Static Variables
            //////////////////////////
    
    
    Severity: Minor
    Found in includes/framework/QApplicationBase.class.php - About 5 hrs to fix

      Method Initialize has 133 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static function Initialize() {
                  self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
      
                  // Are we running as CLI?
                  if (PHP_SAPI == 'cli')
      Severity: Major
      Found in includes/framework/QApplicationBase.class.php - About 5 hrs to fix

        Function Autoload has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

                public static function Autoload($strClassName) {
                    if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                        require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                        return true;
                    } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {
        Severity: Minor
        Found in includes/framework/QApplicationBase.class.php - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function InitializeDatabaseConnections has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

                public static function InitializeDatabaseConnections() {
                    // for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
                    // but check if MAX_DB_CONNECTION_INDEX is defined
                    $intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
        
        
        Severity: Minor
        Found in includes/framework/QApplicationBase.class.php - About 3 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

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

            abstract class QApplicationBase extends QBaseClass {
                //////////////////////////
                // Public Static Variables
                //////////////////////////
        
        

        The class QApplicationBase has 32 non-getter- and setter-methods. Consider refactoring QApplicationBase to keep number of methods under 25.
        Open

            abstract class QApplicationBase extends QBaseClass {
                //////////////////////////
                // Public Static Variables
                //////////////////////////
        
        

        TooManyMethods

        Since: 0.1

        A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        The default was changed from 10 to 25 in PHPMD 2.3.

        Example

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

        The class QApplicationBase has 30 public methods. Consider refactoring QApplicationBase to keep number of public methods under 10.
        Open

            abstract class QApplicationBase extends QBaseClass {
                //////////////////////////
                // Public Static Variables
                //////////////////////////
        
        

        TooManyPublicMethods

        Since: 0.1

        A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        Example

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

        Function RenderCommandArray has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

                private static function RenderCommandArray(array $commandArray) {
                    $strScript = '';
                    foreach ($commandArray as $command) {
                        if (isset($command['script'])) {    // a script to use eval on
                            $strScript .= sprintf('%s;', $command['script']) . _nl();
        Severity: Minor
        Found in includes/framework/QApplicationBase.class.php - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function Redirect has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

                public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
        
                    if (!$blnAbortCurrentScript) {
                        // Use the javascript command mechanism
                        QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;
        Severity: Minor
        Found in includes/framework/QApplicationBase.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

        The class QApplicationBase has 30 fields. Consider redesigning QApplicationBase to keep the number of fields under 15.
        Open

            abstract class QApplicationBase extends QBaseClass {
                //////////////////////////
                // Public Static Variables
                //////////////////////////
        
        

        TooManyFields

        Since: 0.1

        Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

        Example

        class Person {
           protected $one;
           private $two;
           private $three;
           [... many more fields ...]
        }

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

        Method RenderJavascript has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static function RenderJavascript($blnBeforeControls = false) {
                    $strScript = '';
        
                    // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                    if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
        Severity: Minor
        Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

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

                  public static function RenderJavascript($blnBeforeControls = false) {
                      $strScript = '';
          
                      // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                      if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
          Severity: Minor
          Found in includes/framework/QApplicationBase.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 VarDump has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public static function VarDump() {
                      _p('<div class="var-dump"><strong>QCubed Settings</strong><ul>', false);
                      $arrValidationErrors = QInstallationValidator::Validate();
                      foreach ($arrValidationErrors as $objResult) {
                          printf('<li><strong class="warning">WARNING:</strong> %s</li>', $objResult->strMessage);
          Severity: Minor
          Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

            Method RenderCommandArray has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private static function RenderCommandArray(array $commandArray) {
                        $strScript = '';
                        foreach ($commandArray as $command) {
                            if (isset($command['script'])) {    // a script to use eval on
                                $strScript .= sprintf('%s;', $command['script']) . _nl();
            Severity: Minor
            Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

              Function VarDump has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                      public static function VarDump() {
                          _p('<div class="var-dump"><strong>QCubed Settings</strong><ul>', false);
                          $arrValidationErrors = QInstallationValidator::Validate();
                          foreach ($arrValidationErrors as $objResult) {
                              printf('<li><strong class="warning">WARNING:</strong> %s</li>', $objResult->strMessage);
              Severity: Minor
              Found in includes/framework/QApplicationBase.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 ExecuteSelectorFunction has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                          if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                              throw new QCallerException ('Selector must be a string or an array of two items');
                          }
                          $args = func_get_args();
              Severity: Minor
              Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

                Method InitializeDatabaseConnections has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public static function InitializeDatabaseConnections() {
                            // for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
                            // but check if MAX_DB_CONNECTION_INDEX is defined
                            $intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
                
                
                Severity: Minor
                Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

                  The class QApplicationBase has 64 public methods and attributes. Consider reducing the number of public items to less than 45.
                  Open

                      abstract class QApplicationBase extends QBaseClass {
                          //////////////////////////
                          // Public Static Variables
                          //////////////////////////
                  
                  

                  ExcessivePublicCount

                  Since: 0.1

                  A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

                  Example

                  public class Foo {
                      public $value;
                      public $something;
                      public $var;
                      // [... more more public attributes ...]
                  
                      public function doWork() {}
                      public function doMoreWork() {}
                      public function doWorkAgain() {}
                      // [... more more public methods ...]
                  }

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

                  Method GetJavascriptCommandArray has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static function GetJavascriptCommandArray() {
                  
                              if (QApplication::$JavascriptExclusiveCommand) {
                                  // only render this one;
                                  $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];
                  Severity: Minor
                  Found in includes/framework/QApplicationBase.class.php - About 1 hr to fix

                    Function IsRemoteAdminSession has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public static function IsRemoteAdminSession() {
                                // Allow Remote?
                                if (ALLOW_REMOTE_ADMIN === true)
                                    return false;
                    
                    
                    Severity: Minor
                    Found in includes/framework/QApplicationBase.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 ExecuteJavaScript has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public static function ExecuteJavaScript($strJavaScript, $strPriority = QJsPriority::Standard) {
                                if (is_bool($strPriority)) {
                                    //we keep this codepath for backward compatibility
                                    if ($strPriority === true) {
                                        throw new QCallerException('Please specify a correct priority value');
                    Severity: Minor
                    Found in includes/framework/QApplicationBase.class.php - About 55 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function OutputPage has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public static function OutputPage($strBuffer) {
                                // If the ProcessOutput flag is set to false, simply return the buffer
                                // without processing anything.
                                if (!QApplication::$ProcessOutput)
                                    return $strBuffer;
                    Severity: Minor
                    Found in includes/framework/QApplicationBase.class.php - About 55 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function ExecuteSelectorFunction has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                                if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                                    throw new QCallerException ('Selector must be a string or an array of two items');
                                }
                                $args = func_get_args();
                    Severity: Minor
                    Found in includes/framework/QApplicationBase.class.php - About 55 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

                    Method SetCookie has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            public static function SetCookie($strName, $strValue, QDateTime $dttTimeout, $strPath = '/', $strDomain = null, $blnSecure = false) {
                    Severity: Minor
                    Found in includes/framework/QApplicationBase.class.php - About 45 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return true;
                      Severity: Major
                      Found in includes/framework/QApplicationBase.class.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            return $strBuffer;
                        Severity: Major
                        Found in includes/framework/QApplicationBase.class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return false;
                          Severity: Major
                          Found in includes/framework/QApplicationBase.class.php - About 30 mins to fix

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

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];
                            Severity: Minor
                            Found in includes/framework/QApplicationBase.class.php - About 25 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

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

                                    public static function ExecuteJsFunction($strFunctionName /*, ... */) {
                                        $args = func_get_args();
                                        array_shift ($args);
                                        if ($args && end($args) === QJsPriority::High) {
                                            $code = QAjaxResponse::CommandsHigh;
                            Severity: Minor
                            Found in includes/framework/QApplicationBase.class.php - About 25 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

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

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);
                            Severity: Minor
                            Found in includes/framework/QApplicationBase.class.php - About 25 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            The class QApplicationBase has 1401 lines of code. Current threshold is 1000. Avoid really long classes.
                            Open

                                abstract class QApplicationBase extends QBaseClass {
                                    //////////////////////////
                                    // Public Static Variables
                                    //////////////////////////
                            
                            

                            The method Initialize() has an NPath complexity of 11321856. The configured NPath complexity threshold is 200.
                            Open

                                    public static function Initialize() {
                                        self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
                            
                                        // Are we running as CLI?
                                        if (PHP_SAPI == 'cli')

                            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 Initialize() has 185 lines of code. Current threshold is set to 100. Avoid really long methods.
                            Open

                                    public static function Initialize() {
                                        self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
                            
                                        // Are we running as CLI?
                                        if (PHP_SAPI == 'cli')

                            The method RenderJavascript() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            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 InitializeDatabaseConnections() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
                            Open

                                    public static function InitializeDatabaseConnections() {
                                        // for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
                                        // but check if MAX_DB_CONNECTION_INDEX is defined
                                        $intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
                            
                            

                            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 ExecuteSelectorFunction() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
                            Open

                                    public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                                        if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                                            throw new QCallerException ('Selector must be a string or an array of two items');
                                        }
                                        $args = func_get_args();

                            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 Initialize() has a Cyclomatic Complexity of 43. The configured cyclomatic complexity threshold is 10.
                            Open

                                    public static function Initialize() {
                                        self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
                            
                                        // Are we running as CLI?
                                        if (PHP_SAPI == 'cli')

                            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 RenderJavascript() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptCommandArray[QAjaxResponse::CommandsFinal][] = ['selector'=>$mixSelector, 'func'=>$strFunctionName, 'params'=>$args, 'final'=>true];

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                        QApplication::$JavascriptCommandArray[$code][] = ['func'=>$strFunctionName, 'params'=>$args];

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                                array_merge (QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets], $strStyleSheetArray);

                            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 '$JavascriptFileArray' which will lead to PHP notices.
                            Open

                                                array_merge (QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts], $strJavaScriptFileArray);

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] =

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Close] = true;

                            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 '$JavascriptFileArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;

                            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 '$JavascriptFileArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] =

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                        QApplication::$JavascriptCommandArray[QAjaxResponse::Alert][] = $strMessage;

                            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 '$Database' which will lead to PHP notices.
                            Open

                                                QApplication::$Database[$intIndex] = new $strDatabaseType($intIndex, $objConfigArray);

                            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 '$aResponse' which will lead to PHP notices.
                            Open

                                                $aResponse[QAjaxResponse::Close] = 1;

                            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 '$JavascriptFileArray' which will lead to PHP notices.
                            Open

                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {

                            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 '$ClassFile' which will lead to PHP notices.
                            Open

                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {

                            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 '$ClassFile' which will lead to PHP notices.
                            Open

                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                                    QApplication::$JavascriptCommandArray[QAjaxResponse::CommandsLow][] = ['script'=>$strJavaScript];

                            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 '$aResponse' which will lead to PHP notices.
                            Open

                                                QApplication::SendAjaxResponse($aResponse);

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                                    QApplication::$JavascriptCommandArray[QAjaxResponse::CommandsHigh][] = ['script'=>$strJavaScript];

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                                    QApplication::$JavascriptCommandArray[QAjaxResponse::CommandsMedium][] = ['script'=>$strJavaScript];

                            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 '$JavascriptCommandArray' which will lead to PHP notices.
                            Open

                                        QApplication::$JavascriptCommandArray[$code][] = ['selector'=>$mixSelector, 'func'=>$strFunctionName, 'params'=>$args];

                            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

                            The class QApplicationBase has a coupling between objects value of 19. Consider to reduce the number of dependencies under 13.
                            Open

                                abstract class QApplicationBase extends QBaseClass {
                                    //////////////////////////
                                    // Public Static Variables
                                    //////////////////////////
                            
                            

                            CouplingBetweenObjects

                            Since: 1.1.0

                            A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                            Example

                            class Foo {
                                /**
                                 * @var \foo\bar\X
                                 */
                                private $x = null;
                            
                                /**
                                 * @var \foo\bar\Y
                                 */
                                private $y = null;
                            
                                /**
                                 * @var \foo\bar\Z
                                 */
                                private $z = null;
                            
                                public function setFoo(\Foo $foo) {}
                                public function setBar(\Bar $bar) {}
                                public function setBaz(\Baz $baz) {}
                            
                                /**
                                 * @return \SplObjectStorage
                                 * @throws \OutOfRangeException
                                 * @throws \InvalidArgumentException
                                 * @throws \ErrorException
                                 */
                                public function process(\Iterator $it) {}
                            
                                // ...
                            }

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

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

                                    public static function CloseWindow($blnAbortCurrentScript = 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 '1227', column '24').
                            Open

                                                    $objParams = new QJsParameterList($params);

                            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 RenderJavascript has a boolean flag argument $blnBeforeControls, which is a certain sign of a Single Responsibility Principle violation.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = 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 '976', column '15').
                            Open

                                            throw new QCallerException ('Selector must be a string or an array of two items');

                            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 SetCookie has a boolean flag argument $blnSecure, which is a certain sign of a Single Responsibility Principle violation.
                            Open

                                    public static function SetCookie($strName, $strValue, QDateTime $dttTimeout, $strPath = '/', $strDomain = null, $blnSecure = 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 '555', column '15').
                            Open

                                            throw new QCallerException('Error handler is already currently overridden.  Cannot override twice.  Call RestoreErrorHandler before calling SetErrorHandler again.');

                            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 '464', column '15').
                            Open

                                            throw new Exception('Do not define DB_CONNECTION_0. Start at DB_CONNECTION_1');

                            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 '496', column '18').
                            Open

                                                        throw new Exception('Database Type is not valid: ' . $objConfigArray['adapter']);

                            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 '571', column '15').
                            Open

                                            throw new QCallerException('Error handler is not currently overridden.  Cannot reset something that was never overridden.');

                            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 '276', column '15').
                            Open

                                            throw new Exception('Error on QApplication::Initialize() - ScriptFilename or ScriptName was not set');

                            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 '926', column '16').
                            Open

                                                throw new QCallerException('Please specify a correct priority value');

                            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 '490', column '17').
                            Open

                                                    throw new Exception('No Server Defined for ' . $strConstantName . ': ' . constant($strConstantName));

                            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 Redirect has a boolean flag argument $blnAbortCurrentScript, which is a certain sign of a Single Responsibility Principle violation.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

                            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 '775', column '14').
                            Open

                                        throw new QRemoteAdminDeniedException();

                            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 '1218', column '24').
                            Open

                                                    $objParams = new QJsParameterList($params);

                            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 '237', column '14').
                            Open

                                        throw new QCallerException('Application should never be instantiated.  All methods and variables are publically statically accessible.');

                            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 '301', column '17').
                            Open

                                                    throw new Exception('Invalid URL Rewrite type: ' . __URL_REWRITE__);

                            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 '17').
                            Open

                                                    throw new Exception('No Adapter Defined for ' . $strConstantName . ': ' . var_export($objConfigArray, true));

                            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

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

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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

                            Avoid using static access to class 'QApplication' in method 'GenerateQueryStringHelper'.
                            Open

                                                $strToReturn .= QApplication::GenerateQueryStringHelper($strKey . '[' . $strSubKey . ']', $mixSubValue);

                            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 assigning values to variables in if clauses and the like (line '1217', column '10').
                            Open

                                    private static function RenderCommandArray(array $commandArray) {
                                        $strScript = '';
                                        foreach ($commandArray as $command) {
                                            if (isset($command['script'])) {    // a script to use eval on
                                                $strScript .= sprintf('%s;', $command['script']) . _nl();

                            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 RenderCommandArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                                } else {
                                                    $strParams = '';
                                                }

                            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 'QDbBackedSessionHandler' in method 'SessionOverride'.
                            Open

                                            QDbBackedSessionHandler::Initialize(DB_BACKED_SESSION_HANDLER_DB_INDEX, DB_BACKED_SESSION_HANDLER_TABLE_NAME);

                            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 SetErrorHandler uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        } else {
                                            set_error_handler($strName, $intLevel);
                                            QApplicationBase::$intStoredErrorLevel = -1;
                                        }

                            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 RenderCommandArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                                else {
                                                    $strSelector = '"' . $command['selector'] . '"';
                                                }

                            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 Initialize uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        } else {
                                            QApplication::$RequestUri = sprintf('%s%s%s',
                                                QApplication::$ScriptName, QApplication::$PathInfo,
                                                (QApplication::$QueryString) ? sprintf('?%s', QApplication::$QueryString) : 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 ExecuteJsFunction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            $code = QAjaxResponse::CommandsMedium;
                                        }

                            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 'QApplication' in method 'IsRemoteAdminSession'.
                            Open

                                                if (QApplication::IsIPInRange($_SERVER['REMOTE_ADDR'], $strIpAddress) ||

                            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 ExecuteJavaScript uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        } else {
                                            switch ($strPriority) {
                                                case QJsPriority::High:
                                                    QApplication::$JavascriptCommandArray[QAjaxResponse::CommandsHigh][] = ['script'=>$strJavaScript];
                                                    break;

                            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 'QApplicationBase' in method 'OutputPage'.
                            Open

                                                $strScript = QApplicationBase::RenderJavascript();

                            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 RenderCommandArray uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                                else {
                                                    $strParams = '';
                                                }

                            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 CloseWindow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                            } else {
                                                // Use JavaScript to close
                                                _p('<script type="text/javascript">window.close();</script>', false);
                                            }

                            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 AddStyleSheets uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] =
                                                array_merge (QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets], $strStyleSheetArray);
                                        }

                            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 'JavascriptHelper' in method 'SendAjaxResponse'.
                            Open

                                        $strJSON = JavascriptHelper::toJSON($strResponseArray);

                            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 assigning values to variables in if clauses and the like (line '533', column '26').
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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 Redirect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            global $_FORM;
                            
                                            if ($_FORM) {
                                                $_FORM->SaveControlState();

                            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 Redirect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                                } else {
                                                    // We're likely using this as a CGI
                                                    // Use JavaScript to redirect
                                                    printf('<script type="text/javascript">document.location = "%s";</script>', $strLocation);
                                                }

                            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 'QApplication' in method 'CloseWindow'.
                            Open

                                                QApplication::SendAjaxResponse($aResponse);

                            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 OutputPage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                            } else {
                                                // Update Cache-Control setting
                                                header('Cache-Control: ' . QApplication::$CacheControl);
                                                // make sure the server does not override the character encoding value by explicitly sending it out as a header.
                                                // some servers will use an internal default if not specified in the header, and that will override the "encoding" value sent in the text.

                            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 CloseWindow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            // Clear the output buffer (if any)
                                            ob_clean();
                            
                                            if (QApplication::$RequestMode == QRequestMode::Ajax) {

                            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 'QApplication' in method 'GenerateQueryString'.
                            Open

                                                $strToReturn .= QApplication::GenerateQueryStringHelper(urlencode($strKey), $mixValue);

                            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 ExecuteSelectorFunction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            $code = QAjaxResponse::CommandsMedium;
                                        }

                            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 '530', column '27').
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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

                            Avoid using static access to class 'QApplication' in method 'CheckRemoteAdmin'.
                            Open

                                        if (!QApplication::IsRemoteAdminSession()) {

                            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 'QApplication' in method 'IsRemoteAdminSession'.
                            Open

                                                    (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && (QApplication::IsIPInRange($_SERVER['HTTP_X_FORWARDED_FOR'], $strIpAddress)))) {

                            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 OutputPage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        } else {
                                            if (QApplication::$RequestMode == QRequestMode::Ajax) {
                                                return trim($strBuffer);
                                            } else {
                                                // Update Cache-Control setting

                            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 'QInstallationValidator' in method 'VarDump'.
                            Open

                                        $arrValidationErrors = QInstallationValidator::Validate();

                            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 IsIPInRange uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                            } else {
                                                // mask is an integer
                                                $ip_mask = ~((1 << (32 - $mask)) - 1);
                                            }

                            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 'QApplication' in method 'EndOutputBuffering'.
                            Open

                                        return QApplication::OutputPage($strBuffer);

                            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 Initialize uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                            } else {
                                                QApplicationBase::$objCacheProvider = new $strCacheProviderClass();
                                            }

                            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 Redirect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                            } else {
                                                // Was "DOCUMENT_ROOT" set?
                                                if (array_key_exists('DOCUMENT_ROOT', $_SERVER) && ($_SERVER['DOCUMENT_ROOT'])) {
                                                    // If so, we're likely using PHP as a Plugin/Module
                                                    // Use 'header' to redirect

                            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 AddJavaScriptFiles uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] =
                                                array_merge (QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts], $strJavaScriptFileArray);
                                        }

                            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 '524', column '27').
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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 SetCookie uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                        else {
                                            setcookie($strName, $strValue, $dttTimeout->Timestamp, $strPath, $strDomain, $blnSecure);
                                        }

                            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 'QApplication' in method 'RenderFiles'.
                            Open

                                                $strScript .= sprintf('<script type="text/javascript" src="%s"></script>', QApplication::GetJsFileUri($js)) . "\n";

                            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 'QFolder' in method 'MakeDirectory'.
                            Open

                                        return QFolder::MakeDirectory($strPath, $intMode);

                            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 'QApplication' in method 'Redirect'.
                            Open

                                                QApplication::SendAjaxResponse(array(QAjaxResponse::Location => $strLocation));

                            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 Initialize uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                            Open

                                                } else {
                                                    preg_match ('#opera\s(.+)#', $strUserAgent, $matches);
                                                    if ($matches) {
                                                        QApplication::$BrowserVersion = (float)$matches[1];
                                                    }

                            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 'QString' in method 'PathInfo'.
                            Open

                                        if (QString::FirstCharacter($strPathInfo) == '/')            

                            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 assigning values to variables in if clauses and the like (line '1226', column '10').
                            Open

                                    private static function RenderCommandArray(array $commandArray) {
                                        $strScript = '';
                                        foreach ($commandArray as $command) {
                                            if (isset($command['script'])) {    // a script to use eval on
                                                $strScript .= sprintf('%s;', $command['script']) . _nl();

                            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

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

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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

                            Avoid using static access to class 'QDateTime' in method 'DeleteCookie'.
                            Open

                                            $dttTimeout = QDateTime::Now();

                            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 local variables such as '$objObject'.
                            Open

                                        if (QApplication::$Database) foreach (QApplication::$Database as $intKey => $objObject) {

                            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

                            The method Redirect() contains an exit expression.
                            Open

                                            exit();

                            ExitExpression

                            Since: 0.2

                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                            Example

                            class Foo {
                                public function bar($param)  {
                                    if ($param === 42) {
                                        exit(23);
                                    }
                                }
                            }

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

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

                                            $str = '';

                            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

                            The method CloseWindow() contains an exit expression.
                            Open

                                            exit();

                            ExitExpression

                            Since: 0.2

                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                            Example

                            class Foo {
                                public function bar($param)  {
                                    if ($param === 42) {
                                        exit(23);
                                    }
                                }
                            }

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

                            TODO found
                            Open

                                     * TODO: break this into two routines, since the resulting UI behavior is really different. Redirect and LoadPage??

                            TODO found
                            Open

                                     * TODO: Since this is implemented with an "eval" on the client side in ajax, we should phase this out in favor

                            TODO found
                            Open

                                        // TODO: Cache PathInfo

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

                                    public static function GetCssFileUri($strFile) {
                                        if ((strpos($strFile, "http") === 0) || (strpos($strFile, "https") === 0))
                                            return $strFile;
                                        if (strpos($strFile, "/") === 0)
                                            return __VIRTUAL_DIRECTORY__ . $strFile;
                            Severity: Minor
                            Found in includes/framework/QApplicationBase.class.php and 1 other location - About 55 mins to fix
                            includes/framework/QApplicationBase.class.php on lines 1342..1348

                            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 98.

                            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 static function GetJsFileUri($strFile) {
                                        if ((strpos($strFile, "http") === 0) || (strpos($strFile, "https") === 0))
                                            return $strFile;
                                        if (strpos($strFile, "/") === 0)
                                            return __VIRTUAL_DIRECTORY__ . $strFile;
                            Severity: Minor
                            Found in includes/framework/QApplicationBase.class.php and 1 other location - About 55 mins to fix
                            includes/framework/QApplicationBase.class.php on lines 1356..1362

                            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 98.

                            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 $strCacheProviderClass. Keep variable name length under 20.
                            Open

                                        $strCacheProviderClass = 'QCacheProviderNoCache';

                            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 $JavascriptCommandArray. Keep variable name length under 20.
                            Open

                                    protected static $JavascriptCommandArray = 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

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

                                    public static function CloseWindow($blnAbortCurrentScript = false) {

                            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 $JavascriptExclusiveCommand. Keep variable name length under 20.
                            Open

                                    public static $JavascriptExclusiveCommand = null;

                            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 $strJavaScriptFileArray. Keep variable name length under 20.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {

                            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 $blnAbortCurrentScript. Keep variable name length under 20.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {

                            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 $DefaultCrossScriptingMode. Keep variable name length under 20.
                            Open

                                    public static $DefaultCrossScriptingMode = QCrossScripting::Legacy;

                            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 variables with short names like $a. Configured minimum length is 3.
                            Open

                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            ShortVariable

                            Since: 0.2

                            Detects when a field, local, or parameter has a very short name.

                            Example

                            class Something {
                                private $q = 15; // VIOLATION - Field
                                public static function main( array $as ) { // VIOLATION - Formal
                                    $r = 20 + $this->q; // VIOLATION - Local
                                    for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                        $r += $this->q;
                                    }
                                }
                            }

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

                            Avoid variables with short names like $ip. Configured minimum length is 3.
                            Open

                                    public static function IsIPInRange($ip, $range) {

                            ShortVariable

                            Since: 0.2

                            Detects when a field, local, or parameter has a very short name.

                            Example

                            class Something {
                                private $q = 15; // VIOLATION - Field
                                public static function main( array $as ) { // VIOLATION - Formal
                                    $r = 20 + $this->q; // VIOLATION - Local
                                    for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                        $r += $this->q;
                                    }
                                }
                            }

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

                            Constant Chrome should be defined in uppercase
                            Open

                                    const Chrome =         0x100000;

                            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

                            Constant Macintosh should be defined in uppercase
                            Open

                                    const Macintosh =     0x2000000;

                            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

                            Constant High should be defined in uppercase
                            Open

                                    const High = '*jsHigh*';

                            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

                            Constant Safari should be defined in uppercase
                            Open

                                    const Safari =         0x200;

                            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

                            Constant Linux should be defined in uppercase
                            Open

                                    const Linux =         0x1000000;

                            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

                            Constant Mobile should be defined in uppercase
                            Open

                                    const Mobile =         0x4000000;    // some kind of mobile browser

                            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

                            Constant Standard should be defined in uppercase
                            Open

                                    const Standard = '*jsMed*';

                            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

                            Constant InternetExplorer should be defined in uppercase
                            Open

                                    const InternetExplorer = 1;

                            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

                            Constant Standard should be defined in uppercase
                            Open

                                    const Standard = 'Standard';

                            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

                            Constant Ajax should be defined in uppercase
                            Open

                                    const Ajax = 'Ajax';

                            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

                            Constant Unsupported should be defined in uppercase
                            Open

                                    const Unsupported = 0x8000000;

                            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

                            Constant Last should be defined in uppercase
                            Open

                                    const Last = '*jsFinal*';

                            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

                            Constant Konqueror should be defined in uppercase
                            Open

                                    const Konqueror =     0x20000;

                            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

                            Constant Low should be defined in uppercase
                            Open

                                    const Low = '*jsLow*';

                            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

                            Constant Opera should be defined in uppercase
                            Open

                                    const Opera =         0x2000;

                            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

                            Constant Exclusive should be defined in uppercase
                            Open

                                    const Exclusive = '*jsExclusive*';

                            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

                            Constant Windows should be defined in uppercase
                            Open

                                    const Windows =     0x800000;

                            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

                            Constant Firefox should be defined in uppercase
                            Open

                                    const Firefox =     0x10;

                            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 variable $_FORM is not named in camelCase.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
                            
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function RenderFiles() {
                                        $strScript = '';
                            
                                        // Javascript files should get processed before the commands.
                                        if (!empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteJavaScript($strJavaScript, $strPriority = QJsPriority::Standard) {
                                        if (is_bool($strPriority)) {
                                            //we keep this codepath for backward compatibility
                                            if ($strPriority === true) {
                                                throw new QCallerException('Please specify a correct priority value');

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {
                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ClassFile is not named in camelCase.
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ip_mask is not named in camelCase.
                            Open

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ip_mask is not named in camelCase.
                            Open

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function DisplayAlert($strMessage) {
                                        QApplication::$JavascriptCommandArray[QAjaxResponse::Alert][] = $strMessage;
                                    }

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ip_mask is not named in camelCase.
                            Open

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function AddStyleSheets (array $strStyleSheetArray) {
                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteJavaScript($strJavaScript, $strPriority = QJsPriority::Standard) {
                                        if (is_bool($strPriority)) {
                                            //we keep this codepath for backward compatibility
                                            if ($strPriority === true) {
                                                throw new QCallerException('Please specify a correct priority value');

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                                        if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                                            throw new QCallerException ('Selector must be a string or an array of two items');
                                        }
                                        $args = func_get_args();

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                                        if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                                            throw new QCallerException ('Selector must be a string or an array of two items');
                                        }
                                        $args = func_get_args();

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function AddStyleSheets (array $strStyleSheetArray) {
                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ClassFile is not named in camelCase.
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function CloseWindow($blnAbortCurrentScript = false) {
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Close] = true;
                                        }

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function AddStyleSheets (array $strStyleSheetArray) {
                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
                            
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {
                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {
                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $Database is not named in camelCase.
                            Open

                                    public static function InitializeDatabaseConnections() {
                                        // for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
                                        // but check if MAX_DB_CONNECTION_INDEX is defined
                                        $intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
                            
                            

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteJsFunction($strFunctionName /*, ... */) {
                                        $args = func_get_args();
                                        array_shift ($args);
                                        if ($args && end($args) === QJsPriority::High) {
                                            $code = QAjaxResponse::CommandsHigh;

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function AddStyleSheets (array $strStyleSheetArray) {
                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {
                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;
                                        }
                                        else {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $_FORM is not named in camelCase.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
                            
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function ExecuteJavaScript($strJavaScript, $strPriority = QJsPriority::Standard) {
                                        if (is_bool($strPriority)) {
                                            //we keep this codepath for backward compatibility
                                            if ($strPriority === true) {
                                                throw new QCallerException('Please specify a correct priority value');

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $_FORM is not named in camelCase.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
                            
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $ip_mask is not named in camelCase.
                            Open

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptFileArray is not named in camelCase.
                            Open

                                    public static function RenderFiles() {
                                        $strScript = '';
                            
                                        // Javascript files should get processed before the commands.
                                        if (!empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The variable $JavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            CamelCaseVariableName

                            Since: 0.2

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

                            Example

                            class ClassName {
                                public function doSomething() {
                                    $data_module = new DataModule();
                                }
                            }

                            Source

                            The method InitializeDatabaseConnections is not named in camelCase.
                            Open

                                    public static function InitializeDatabaseConnections() {
                                        // for backward compatibility, don't use MAX_DB_CONNECTION_INDEX directly,
                                        // but check if MAX_DB_CONNECTION_INDEX is defined
                                        $intMaxIndex = defined('MAX_DB_CONNECTION_INDEX') ? constant('MAX_DB_CONNECTION_INDEX') : 9;
                            
                            

                            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 ExecuteControlCommand is not named in camelCase.
                            Open

                                    public static function ExecuteControlCommand ($strControlId, $strFunctionName /*, ..., QJsPriority */) {
                                        $args = func_get_args();
                                        $args[0] = '#' . $strControlId;
                                        call_user_func_array('QApplication::ExecuteSelectorFunction', $args);
                                    }

                            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 GetJsFileUri is not named in camelCase.
                            Open

                                    public static function GetJsFileUri($strFile) {
                                        if ((strpos($strFile, "http") === 0) || (strpos($strFile, "https") === 0))
                                            return $strFile;
                                        if (strpos($strFile, "/") === 0)
                                            return __VIRTUAL_DIRECTORY__ . $strFile;

                            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 StartOutputBuffering is not named in camelCase.
                            Open

                                    public static function StartOutputBuffering() {
                                        if (php_sapi_name() !== 'cli' &&    // Do not buffer the command line interface
                                            !defined('__NO_OUTPUT_BUFFER__')) {
                            
                                            ob_start('QApplicationBase::EndOutputBuffering');

                            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 Initialize is not named in camelCase.
                            Open

                                    public static function Initialize() {
                                        self::$EncodingType = defined('__QAPPLICATION_ENCODING_TYPE__') ? __QAPPLICATION_ENCODING_TYPE__ : self::$EncodingType;
                            
                                        // Are we running as CLI?
                                        if (PHP_SAPI == 'cli')

                            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 IsBrowser is not named in camelCase.
                            Open

                                    public static function IsBrowser($intBrowserType) {
                                        return ($intBrowserType & QApplication::$BrowserType);
                                    }

                            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 DeleteCookie is not named in camelCase.
                            Open

                                    public static function DeleteCookie($strName) {
                                        if (isset($_COOKIE[$strName])) { // don't post a cookie if its not set
                                            $dttTimeout = QDateTime::Now();
                                            $dttTimeout->AddYears(-5);
                            
                            

                            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 RenderCommandArray is not named in camelCase.
                            Open

                                    private static function RenderCommandArray(array $commandArray) {
                                        $strScript = '';
                                        foreach ($commandArray as $command) {
                                            if (isset($command['script'])) {    // a script to use eval on
                                                $strScript .= sprintf('%s;', $command['script']) . _nl();

                            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 SessionOverride is not named in camelCase.
                            Open

                                    public static function SessionOverride() {
                                        // Are we using QDbBackedSessionHandler?
                                        if (defined("DB_BACKED_SESSION_HANDLER_DB_INDEX") &&
                                                constant("DB_BACKED_SESSION_HANDLER_DB_INDEX") != 0 && defined("DB_BACKED_SESSION_HANDLER_TABLE_NAME")) {
                                            // Yes we are going to override PHP's default file based handlers.

                            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 CloseWindow is not named in camelCase.
                            Open

                                    public static function CloseWindow($blnAbortCurrentScript = false) {
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Close] = true;
                                        }

                            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 AddStyleSheets is not named in camelCase.
                            Open

                                    public static function AddStyleSheets (array $strStyleSheetArray) {
                                        if (empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets] = $strStyleSheetArray;
                                        }
                                        else {

                            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 EndOutputBuffering is not named in camelCase.
                            Open

                                    public static function EndOutputBuffering($strBuffer) {
                                        return QApplication::OutputPage($strBuffer);
                                    }

                            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 Redirect is not named in camelCase.
                            Open

                                    public static function Redirect($strLocation, $blnAbortCurrentScript = true) {
                            
                                        if (!$blnAbortCurrentScript) {
                                            // Use the javascript command mechanism
                                            QApplication::$JavascriptCommandArray[QAjaxResponse::Location] = $strLocation;

                            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 QueryString is not named in camelCase.
                            Open

                                    public static function QueryString($strItem) {
                                        if (array_key_exists($strItem, $_GET))
                                            return $_GET[$strItem];
                                        else
                                            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 GetCssFileUri is not named in camelCase.
                            Open

                                    public static function GetCssFileUri($strFile) {
                                        if ((strpos($strFile, "http") === 0) || (strpos($strFile, "https") === 0))
                                            return $strFile;
                                        if (strpos($strFile, "/") === 0)
                                            return __VIRTUAL_DIRECTORY__ . $strFile;

                            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 GenerateQueryStringHelper is not named in camelCase.
                            Open

                                    protected static function GenerateQueryStringHelper($strKey, $mixValue) {
                                        if (is_array($mixValue)) {
                                            $strToReturn = null;
                                            foreach ($mixValue as $strSubKey => $mixSubValue) {
                                                $strToReturn .= QApplication::GenerateQueryStringHelper($strKey . '[' . $strSubKey . ']', $mixSubValue);

                            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 ExecuteJavaScript is not named in camelCase.
                            Open

                                    public static function ExecuteJavaScript($strJavaScript, $strPriority = QJsPriority::Standard) {
                                        if (is_bool($strPriority)) {
                                            //we keep this codepath for backward compatibility
                                            if ($strPriority === true) {
                                                throw new QCallerException('Please specify a correct priority value');

                            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 ExecuteJsFunction is not named in camelCase.
                            Open

                                    public static function ExecuteJsFunction($strFunctionName /*, ... */) {
                                        $args = func_get_args();
                                        array_shift ($args);
                                        if ($args && end($args) === QJsPriority::High) {
                                            $code = QAjaxResponse::CommandsHigh;

                            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 RenderJavascript is not named in camelCase.
                            Open

                                    public static function RenderJavascript($blnBeforeControls = false) {
                                        $strScript = '';
                            
                                        // Style sheet injection by a control. Not very common, as other ways of adding style sheets would normally be done first.
                                        if (!empty(QApplication::$JavascriptCommandArray[QAjaxResponse::StyleSheets])) {

                            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 MakeDirectory is not named in camelCase.
                            Open

                                    public static function MakeDirectory($strPath, $intMode = null) {
                                        return QFolder::MakeDirectory($strPath, $intMode);
                                    }

                            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 ExecuteSelectorFunction is not named in camelCase.
                            Open

                                    public static function ExecuteSelectorFunction ($mixSelector, $strFunctionName /*, ..., QJsPriority */) {
                                        if (!(is_string($mixSelector) || (is_array($mixSelector) && count($mixSelector) == 2))) {
                                            throw new QCallerException ('Selector must be a string or an array of two items');
                                        }
                                        $args = func_get_args();

                            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 SetCookie is not named in camelCase.
                            Open

                                    public static function SetCookie($strName, $strValue, QDateTime $dttTimeout, $strPath = '/', $strDomain = null, $blnSecure = false) {
                                        if (QApplication::$RequestMode == QRequestMode::Ajax) {
                                            self::ExecuteJsFunction ('qcubed.setCookie', $strName, $strValue, $dttTimeout, $strPath, $strDomain, $blnSecure);
                                        }
                                        else {

                            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 CheckRemoteAdmin is not named in camelCase.
                            Open

                                    public static function CheckRemoteAdmin() {
                                        if (!QApplication::IsRemoteAdminSession()) {
                                            return;
                                        }
                            
                            

                            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 IsRemoteAdminSession is not named in camelCase.
                            Open

                                    public static function IsRemoteAdminSession() {
                                        // Allow Remote?
                                        if (ALLOW_REMOTE_ADMIN === true)
                                            return 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 IsIPInRange is not named in camelCase.
                            Open

                                    public static function IsIPInRange($ip, $range) {
                                        $ip = trim($ip);
                                        if (strpos($range, '/') !== false) {
                                            // we are given a IP/mask
                                            list($net, $mask) = explode('/', $range);

                            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 OutputPage is not named in camelCase.
                            Open

                                    public static function OutputPage($strBuffer) {
                                        // If the ProcessOutput flag is set to false, simply return the buffer
                                        // without processing anything.
                                        if (!QApplication::$ProcessOutput)
                                            return $strBuffer;

                            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 RenderFiles is not named in camelCase.
                            Open

                                    public static function RenderFiles() {
                                        $strScript = '';
                            
                                        // Javascript files should get processed before the commands.
                                        if (!empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {

                            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 GenerateQueryString is not named in camelCase.
                            Open

                                    public static function GenerateQueryString($arr = null) {
                                        if(null === $arr)
                                            $arr = $_GET;
                                        if (count($arr)) {
                                            $strToReturn = '';

                            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 PathInfo is not named in camelCase.
                            Open

                                    public static function PathInfo($intIndex) {
                                        // TODO: Cache PathInfo
                                        $strPathInfo = urldecode(QApplication::$PathInfo);
                                        
                                        // Remove Starting '/'

                            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 AddJavaScriptFiles is not named in camelCase.
                            Open

                                    public static function AddJavaScriptFiles ($strJavaScriptFileArray) {
                                        if (empty(QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts])) {
                                            QApplication::$JavascriptFileArray[QAjaxResponse::JavaScripts] = $strJavaScriptFileArray;
                                        }
                                        else {

                            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 Autoload is not named in camelCase.
                            Open

                                    public static function Autoload($strClassName) {
                                        if (isset(QApplication::$ClassFile[strtolower($strClassName)])) {
                                            require_once (QApplication::$ClassFile[strtolower($strClassName)]);
                                            return true;
                                        } else if (file_exists($strFilePath = sprintf('%s/%s.class.php', __INCLUDES__, $strClassName))) {

                            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 GetJavascriptCommandArray is not named in camelCase.
                            Open

                                    public static function GetJavascriptCommandArray() {
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            // only render this one;
                                            $a[QAjaxResponse::CommandsMedium] = [QApplication::$JavascriptExclusiveCommand];

                            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 VarDump is not named in camelCase.
                            Open

                                    public static function VarDump() {
                                        _p('<div class="var-dump"><strong>QCubed Settings</strong><ul>', false);
                                        $arrValidationErrors = QInstallationValidator::Validate();
                                        foreach ($arrValidationErrors as $objResult) {
                                            printf('<li><strong class="warning">WARNING:</strong> %s</li>', $objResult->strMessage);

                            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 SetErrorHandler is not named in camelCase.
                            Open

                                    public static function SetErrorHandler($strName, $intLevel = null) {
                                        if (!is_null(QApplicationBase::$intStoredErrorLevel))
                                            throw new QCallerException('Error handler is already currently overridden.  Cannot override twice.  Call RestoreErrorHandler before calling SetErrorHandler again.');
                                        if (!$strName) {
                                            // No Error Handling is wanted -- simulate a "On Error, Resume" type of functionality

                            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 DisplayAlert is not named in camelCase.
                            Open

                                    public static function DisplayAlert($strMessage) {
                                        QApplication::$JavascriptCommandArray[QAjaxResponse::Alert][] = $strMessage;
                                    }

                            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 SendAjaxResponse is not named in camelCase.
                            Open

                                    public static function SendAjaxResponse(array $strResponseArray) {
                                        header('Content-Type: text/json'); // not application/json, as IE reportedly blows up on that, but jQuery knows what to do.
                                        $strJSON = JavascriptHelper::toJSON($strResponseArray);
                                        if (QApplication::$EncodingType && QApplication::$EncodingType != 'UTF-8') {
                                            $strJSON = iconv(QApplication::$EncodingType, 'UTF-8', $strJSON); // json must be UTF-8 encoded

                            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 RestoreErrorHandler is not named in camelCase.
                            Open

                                    public static function RestoreErrorHandler() {
                                        if (is_null(QApplicationBase::$intStoredErrorLevel))
                                            throw new QCallerException('Error handler is not currently overridden.  Cannot reset something that was never overridden.');
                                        if (QApplicationBase::$intStoredErrorLevel != -1)
                                            error_reporting(QApplicationBase::$intStoredErrorLevel);

                            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 Translate is not named in camelCase.
                            Open

                                    public static function Translate($strToken) {
                                        if (QApplication::$LanguageObject)
                                            return QApplication::$LanguageObject->TranslateToken($strToken);
                                        else
                                            return $strToken;

                            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 HtmlEntities is not named in camelCase.
                            Open

                                    public static function HtmlEntities($strText) {
                                        return htmlentities($strText, ENT_COMPAT | ENT_HTML5, QApplication::$EncodingType);
                                    }

                            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