qcubed/framework

View on GitHub
includes/base_controls/QFormBase.class.php

Summary

Maintainability
F
2 wks
Test Coverage

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

TriggerActions accesses the super-global variable $_POST.
Open

        protected function TriggerActions($strControlIdOverride = null) {
            if (array_key_exists('Qform__FormControl', $_POST)) {
                if ($strControlIdOverride) {
                    $strControlId = $strControlIdOverride;
                } else {

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

InvalidFormState accesses the super-global variable $_POST.
Open

        public static function InvalidFormState() {
            //ob_clean();
            if (isset($_POST['Qform__FormCallType']) &&  $_POST['Qform__FormCallType'] == QCallType::Ajax) {
                QApplication::$ProcessOutput = false;
                QApplication::SendAjaxResponse(['loc' => 'reload']);

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

TriggerActions accesses the super-global variable $_POST.
Open

        protected function TriggerActions($strControlIdOverride = null) {
            if (array_key_exists('Qform__FormControl', $_POST)) {
                if ($strControlIdOverride) {
                    $strControlId = $strControlIdOverride;
                } else {

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

Run accesses the super-global variable $_POST.
Open

        public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
            // See if we can get a Form Class out of PostData
            $objClass = null;
            if ($strFormId === null) {
                $strFormId = $strFormClass;

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

TriggerMethod accesses the super-global variable $_POST.
Open

        protected function TriggerMethod($strControlId, $strMethodName, QAction $objAction) {
            $mixParameter = $_POST['Qform__FormParameter'];
            $objSourceControl = $this->objControlArray[$strControlId];
            $params = QControl::_ProcessActionParams($objSourceControl, $objAction, $mixParameter);

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

InvalidFormState accesses the super-global variable $_POST.
Open

        public static function InvalidFormState() {
            //ob_clean();
            if (isset($_POST['Qform__FormCallType']) &&  $_POST['Qform__FormCallType'] == QCallType::Ajax) {
                QApplication::$ProcessOutput = false;
                QApplication::SendAjaxResponse(['loc' => 'reload']);

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

TriggerActions accesses the super-global variable $_POST.
Open

        protected function TriggerActions($strControlIdOverride = null) {
            if (array_key_exists('Qform__FormControl', $_POST)) {
                if ($strControlIdOverride) {
                    $strControlId = $strControlIdOverride;
                } else {

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 TriggerActions has a Cognitive Complexity of 225 (exceeds 5 allowed). Consider refactoring.
Open

        protected function TriggerActions($strControlIdOverride = null) {
            if (array_key_exists('Qform__FormControl', $_POST)) {
                if ($strControlIdOverride) {
                    $strControlId = $strControlIdOverride;
                } else {
Severity: Minor
Found in includes/base_controls/QFormBase.class.php - About 4 days 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 QFormBase.class.php has 1008 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
    /**
     * This file contains the QFormBase class.
     *
     * @package Controls
Severity: Major
Found in includes/base_controls/QFormBase.class.php - About 2 days to fix

    Function Run has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
    Open

            public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                // See if we can get a Form Class out of PostData
                $objClass = null;
                if ($strFormId === null) {
                    $strFormId = $strFormClass;
    Severity: Minor
    Found in includes/base_controls/QFormBase.class.php - About 2 days 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

    QFormBase has 59 functions (exceeds 20 allowed). Consider refactoring.
    Open

        abstract class QFormBase extends QBaseClass {
            ///////////////////////////
            // Static Members
            ///////////////////////////
            /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */
    Severity: Major
    Found in includes/base_controls/QFormBase.class.php - About 1 day to fix

      Method Run has 172 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                  // See if we can get a Form Class out of PostData
                  $objClass = null;
                  if ($strFormId === null) {
                      $strFormId = $strFormClass;
      Severity: Major
      Found in includes/base_controls/QFormBase.class.php - About 6 hrs to fix

        Function RenderEnd has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
        Open

                public function RenderEnd($blnDisplayOutput = true) {
                    // Ensure that RenderEnd() has not yet been called
                    switch ($this->intFormStatus) {
                        case QFormBase::FormStatusUnrendered:
                            throw new QCallerException('$this->RenderBegin() was never called');
        Severity: Minor
        Found in includes/base_controls/QFormBase.class.php - About 5 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method RenderEnd has 114 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function RenderEnd($blnDisplayOutput = true) {
                    // Ensure that RenderEnd() has not yet been called
                    switch ($this->intFormStatus) {
                        case QFormBase::FormStatusUnrendered:
                            throw new QCallerException('$this->RenderBegin() was never called');
        Severity: Major
        Found in includes/base_controls/QFormBase.class.php - About 4 hrs to fix

          Method TriggerActions has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  protected function TriggerActions($strControlIdOverride = null) {
                      if (array_key_exists('Qform__FormControl', $_POST)) {
                          if ($strControlIdOverride) {
                              $strControlId = $strControlIdOverride;
                          } else {
          Severity: Major
          Found in includes/base_controls/QFormBase.class.php - About 3 hrs to fix

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

                    protected function RenderAjax() {
                        $aResponse = array();
            
                        if (QApplication::$JavascriptExclusiveCommand) {
                            /**
            Severity: Minor
            Found in includes/base_controls/QFormBase.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 QFormBase has an overall complexity of 314 which is very high. The configured complexity threshold is 50.
            Open

                abstract class QFormBase extends QBaseClass {
                    ///////////////////////////
                    // Static Members
                    ///////////////////////////
                    /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

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

                abstract class QFormBase extends QBaseClass {
                    ///////////////////////////
                    // Static Members
                    ///////////////////////////
                    /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

            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 QFormBase has 23 public methods. Consider refactoring QFormBase to keep number of public methods under 10.
            Open

                abstract class QFormBase extends QBaseClass {
                    ///////////////////////////
                    // Static Members
                    ///////////////////////////
                    /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

            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

            Method RenderAjax has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    protected function RenderAjax() {
                        $aResponse = array();
            
                        if (QApplication::$JavascriptExclusiveCommand) {
                            /**
            Severity: Major
            Found in includes/base_controls/QFormBase.class.php - About 2 hrs to fix

              Function RenderBegin has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function RenderBegin($blnDisplayOutput = true) {
                          // Ensure that RenderBegin() has not yet been called
                          switch ($this->intFormStatus) {
                              case QFormBase::FormStatusUnrendered:
                                  break;
              Severity: Minor
              Found in includes/base_controls/QFormBase.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 RenderStyles has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                          $strToReturn = '';
                          $this->strIncludedStyleSheetFileArray = array();
              
                          // Figure out initial list of StyleSheet includes
              Severity: Minor
              Found in includes/base_controls/QFormBase.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

              Method RenderBegin has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public function RenderBegin($blnDisplayOutput = true) {
                          // Ensure that RenderBegin() has not yet been called
                          switch ($this->intFormStatus) {
                              case QFormBase::FormStatusUnrendered:
                                  break;
              Severity: Minor
              Found in includes/base_controls/QFormBase.class.php - About 2 hrs to fix

                The class QFormBase has 21 fields. Consider redesigning QFormBase to keep the number of fields under 15.
                Open

                    abstract class QFormBase extends QBaseClass {
                        ///////////////////////////
                        // Static Members
                        ///////////////////////////
                        /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

                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 RenderStyles has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                            $strToReturn = '';
                            $this->strIncludedStyleSheetFileArray = array();
                
                            // Figure out initial list of StyleSheet includes
                Severity: Minor
                Found in includes/base_controls/QFormBase.class.php - About 1 hr to fix

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

                          protected function ProcessStyleSheetList($strStyleSheetFileList) {
                              $strArrayToReturn = array();
                  
                              // Is there a comma-delimited list of StyleSheet files to include?
                              if ($strStyleSheetFileList = trim($strStyleSheetFileList)) {
                  Severity: Minor
                  Found in includes/base_controls/QFormBase.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 GetErrorControls has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function GetErrorControls($blnErrorsOnly = false) {
                              $objToReturn = array();
                              foreach ($this->GetAllControls() as $objControl) {
                                  if ($objControl->ValidationError)
                                      array_push($objToReturn, $objControl);
                  Severity: Minor
                  Found in includes/base_controls/QFormBase.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 __set has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public function __set($strName, $mixValue) {
                              switch ($strName) {
                                  case "HtmlIncludeFilePath":
                                      // Passed-in value is null -- use the "default" path name of file".tpl.php"
                                      if (!$mixValue) {
                  Severity: Minor
                  Found in includes/base_controls/QFormBase.class.php - About 1 hr to fix

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

                            public function __set($strName, $mixValue) {
                                switch ($strName) {
                                    case "HtmlIncludeFilePath":
                                        // Passed-in value is null -- use the "default" path name of file".tpl.php"
                                        if (!$mixValue) {
                    Severity: Minor
                    Found in includes/base_controls/QFormBase.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 GetChildControls has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function GetChildControls($objParentObject) {
                                $objControlArrayToReturn = array();
                    
                                if ($objParentObject instanceof QForm) {
                                    // They want all the ChildControls for this Form
                    Severity: Minor
                    Found in includes/base_controls/QFormBase.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 ProcessJavaScriptList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                            protected function ProcessJavaScriptList($strJavaScriptFileList)  {
                    
                                if (empty($strJavaScriptFileList)) return null;
                    
                                $strArrayToReturn = array();
                    Severity: Minor
                    Found in includes/base_controls/QFormBase.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 GetErrorMessages has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function GetErrorMessages($blnErrorsOnly = false) {
                                $strToReturn = array();
                                foreach ($this->GetAllControls() as $objControl) {
                                    if ($objControl->ValidationError)
                                        array_push($strToReturn, $objControl->ValidationError);
                    Severity: Minor
                    Found in includes/base_controls/QFormBase.class.php - About 45 mins to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Avoid deeply nested control flow statements.
                    Open

                                                        if (($strAjaxActionId == NULL)             //if this call was not an ajax call
                                                            || ($objAction->Id == NULL)         // or the QAjaxAction derived action has no id set
                                                            //(a possible way to add a callback that gets executed on every ajax call for this control)
                                                            || ($strAjaxActionId == $objAction->Id)) //or the ajax action id passed from client side equals the id of the current ajax action
                                                            $this->TriggerMethod($strControlId, $strMethodName, $objAction);
                    Severity: Major
                    Found in includes/base_controls/QFormBase.class.php - About 45 mins to fix

                      Function UnpackPostVar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                              protected static function UnpackPostVar($val) {
                                  if (QApplication::$EncodingType != 'UTF-8' && QApplication::$RequestMode != QRequestMode::Ajax) {
                                      // json_decode only accepts utf-8 encoded text. Ajax calls are already UTF-8 encoded.
                                      $val = iconv(QApplication::$EncodingType, 'UTF-8', $val);
                                  }
                      Severity: Minor
                      Found in includes/base_controls/QFormBase.class.php - About 35 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 ctlDesigner_Click has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                              private function ctlDesigner_Click ($strFormId, $strControlId, $mixParam) {
                                  if (isset($mixParam['id'])) {
                                      $controlId = $mixParam['id'];
                                      if (strpos($controlId, '_')) {    // extra the real control id from a sub id
                                          $controlId = substr($controlId, 0, strpos($controlId, '_'));
                      Severity: Minor
                      Found in includes/base_controls/QFormBase.class.php - About 35 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 Unserialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public static function Unserialize($strPostDataState) {
                                  // Setup and Call the FormStateHandler to retrieve the Serialized Form
                                  $strFormStateHandler = QForm::$FormStateHandler;
                                  $strSerializedForm = $strFormStateHandler::Load ($strPostDataState);
                      
                      
                      Severity: Minor
                      Found in includes/base_controls/QFormBase.class.php - About 35 mins to fix

                      Cognitive Complexity

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

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

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

                      Further reading

                      Avoid too many return statements within this method.
                      Open

                                      case "HtmlIncludeFilePath": return $this->strHtmlIncludeFilePath;
                      Severity: Major
                      Found in includes/base_controls/QFormBase.class.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        case "CssClass": return $this->strCssClass;
                        Severity: Major
                        Found in includes/base_controls/QFormBase.class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                  return parent::__get($strName);
                          Severity: Major
                          Found in includes/base_controls/QFormBase.class.php - About 30 mins to fix

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

                                    public function RemoveControl($strControlId) {
                                        if (isset($this->objControlArray[$strControlId])) {
                                            // Get the Control in Question
                                            $objControl = $this->objControlArray[$strControlId];
                            
                            
                            Severity: Minor
                            Found in includes/base_controls/QFormBase.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 EvaluateTemplate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    public function EvaluateTemplate($strTemplate) {
                                        global $_ITEM;
                                        global $_CONTROL;
                                        global $_FORM;
                            
                            
                            Severity: Minor
                            Found in includes/base_controls/QFormBase.class.php - About 25 mins to fix

                            Cognitive Complexity

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

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

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

                            Further reading

                            The method RenderAjax() has an NPath complexity of 6480. The configured NPath complexity threshold is 200.
                            Open

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            /**

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

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            /**

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

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

                            The method RenderEnd() has an NPath complexity of 145152. The configured NPath complexity threshold is 200.
                            Open

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

                            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 class QFormBase has 1885 lines of code. Current threshold is 1000. Avoid really long classes.
                            Open

                                abstract class QFormBase extends QBaseClass {
                                    ///////////////////////////
                                    // Static Members
                                    ///////////////////////////
                                    /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

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

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

                            The method Run() has an NPath complexity of 49352688. The configured NPath complexity threshold is 200.
                            Open

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

                            The method TriggerActions() has an NPath complexity of 41989. The configured NPath complexity threshold is 200.
                            Open

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

                            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 RenderBegin() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
                            Open

                                    public function RenderBegin($blnDisplayOutput = true) {
                                        // Ensure that RenderBegin() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                break;

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

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                    public function RenderBegin($blnDisplayOutput = true) {
                                        // Ensure that RenderBegin() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                break;

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

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

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

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            /**

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

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

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

                                    public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                                        $strToReturn = '';
                                        $this->strIncludedStyleSheetFileArray = array();
                            
                                        // Figure out initial list of StyleSheet includes

                            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 class QFormBase has a coupling between objects value of 24. Consider to reduce the number of dependencies under 13.
                            Open

                                abstract class QFormBase extends QBaseClass {
                                    ///////////////////////////
                                    // Static Members
                                    ///////////////////////////
                                    /** @var bool True when css scripts get rendered on page. Lets user call RenderStyles in header. */

                            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

                            Missing class import via use statement (line '612', column '18').
                            Open

                                                        throw new QCallerException('FormStatus is in an unknown status');

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

                                                $dlg = new QModelConnectorEditDlg ($objClass, 'qconnectoreditdlg');

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

                                    public function VarExport($blnReturn = 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 '608', column '18').
                            Open

                                                        throw new QCallerException('$this->RenderEnd() is never called in the HTML Include file');

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

                                                throw new Exception ('Unknown Post Var Type');

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

                                    protected function RenderChildren($blnDisplayOutput = 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 '1362', column '17').
                            Open

                                                    throw new Exception(sprintf('Control passed by Qform__FormControl does not exist: %s', $strControlId));

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

                                    public function RenderStyles($blnDisplayOutput = true, $blnInHead = 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 '576', column '11').
                            Open

                                                    new QAjaxAction ('ctlDesigner_Click', null, null, 'ui')

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

                                            throw new QCallerException(sprintf("Custom Attribute does not exist in Form: %s", $strName));

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

                                                throw new QCallerException('$this->RenderBegin() has already been called');

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

                                    public function GetErrorMessages($blnErrorsOnly = 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 '617', column '16').
                            Open

                                                throw new Exception('Unknown Form CallType: ' . $objClass->strCallType);

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

                                            throw new QCallerException(sprintf('A Grouping already exists in the form with the ID: %s', $strControlId));

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

                                            throw new QCallerException(sprintf('A Control already exists in the form with the ID: %s', $strGroupingId));

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

                                    public function RenderBegin($blnDisplayOutput = 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 '162', column '17').
                            Open

                                                    throw new QCallerException('Accompanying HTML Include File does not exist: "' . $mixValue . '"');

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

                                            throw new QCallerException('ParentObject must be either a QForm or QControl object');

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

                                            throw new QDataBindException($objExc);

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

                                            throw new QCallerException(sprintf("Custom Attribute does not exist in Form: %s", $strName));

                            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 '575', column '11').
                            Open

                                                    new QOnEvent('qdesignerclick'),

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

                                            throw new QCallerException(sprintf('A control already exists in the form with the ID: %s', $strControlId));

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

                                                throw new QCallerException('$this->RenderBegin() was never called');

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

                                    public function GetErrorControls($blnErrorsOnly = 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 '606', column '18').
                            Open

                                                        throw new QCallerException('$this->RenderBegin() is never called in the HTML Include file');

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

                                            throw new QCallerException(sprintf('A Grouping already exists in the form with the ID: %s', $strGroupingId));

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

                                                throw new QCallerException('FormStatus is in an unknown status');

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

                                            throw new QCallerException(sprintf("Custom Attribute not supported through SetCustomAttribute(): %s", $strName));

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

                                                throw new QCallerException('FormStatus is in an unknown status');

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

                                    public function RenderEnd($blnDisplayOutput = 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 '1724', column '16').
                            Open

                                                throw new QCallerException('$this->RenderEnd() has already been called');

                            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 '1252', column '19').
                            Open

                                                            throw new Exception('Unknown Form CallType: ' . $this->strCallType);

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

                                    public function RenderStyles($blnDisplayOutput = true, $blnInHead = 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

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

                                                    return ($this->strCssClass = QType::Cast($mixValue, QType::String));

                            StaticAccess

                            Since: 1.4.0

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

                            Example

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

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

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

                                        } else {
                                            // We have no form state -- Create Brand New One
                                            $objClass = new $strFormClass();
                            
                                            // Globalize

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

                                        else {
                                            return null;
                                        }

                            ElseExpression

                            Since: 1.4.0

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

                            Example

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

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

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

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                            } else {
                                                $objClass->checkableControlValues = [];
                                            }

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

                                                    } else {
                                                        $strControlId = $key;
                                                    }

                            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 'RenderAjax'.
                            Open

                                                QApplication::ExecuteJavaScript($strScript, QJsPriority::High);    // put these last in the high priority queue, just before getting the commands below

                            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 '1191', column '13').
                            Open

                                    protected function TriggerMethod($strControlId, $strMethodName, QAction $objAction) {
                                        $mixParameter = $_POST['Qform__FormParameter'];
                                        $objSourceControl = $this->objControlArray[$strControlId];
                                        $params = QControl::_ProcessActionParams($objSourceControl, $objAction, $mixParameter);
                            
                            

                            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 'QForm' in method 'RenderAjax'.
                            Open

                                            $strFormState = QForm::Serialize($this);

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

                                            } else {
                                                return '';
                                            }

                            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 '1600', column '8').
                            Open

                                    protected function ProcessStyleSheetList($strStyleSheetFileList) {
                                        $strArrayToReturn = array();
                            
                                        // Is there a comma-delimited list of StyleSheet files to include?
                                        if ($strStyleSheetFileList = trim($strStyleSheetFileList)) {

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

                                        } else {
                                            if(!QApplication::$CliMode) {
                                                return $strHtml;
                                            } else {
                                                return '';

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

                                            else {
                                                // Ajax post. Only send data to controls specified in the post to save time.
                            
                                                $previouslyFoundArray = array();
                                                $controls = $_POST;

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

                                            else {
                                                throw new Exception ('Unknown Post Var Type');
                                            }

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

                                        } else {
                                            header('Location: '. QApplication::$RequestUri);
                                        }

                            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 'RenderAjax'.
                            Open

                                                QApplication::AddJavaScriptFiles($strScriptArray);

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

                                            } else {
                                                // if the parent is the form, then remove it from the dom through javascript, since the form won't be redrawn
                                                QApplication::ExecuteSelectorFunction('#' . $objControl->GetWrapperId(), 'remove');
                                            }

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

                                                    } else {}

                            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 'QForm' in method 'Run'.
                            Open

                                                $objClass = QForm::Unserialize($strPostDataState);

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

                                        else {
                                            $this->strCustomAttributeArray[$strName] = null;
                                            unset($this->strCustomAttributeArray[$strName]);
                                        }

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

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

                            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 'RenderEnd'.
                            Open

                                        QApplication::AddJavaScriptFiles($strJavaScriptArray);

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

                                                                    } else {
                                                                        // Remove all parents
                                                                        $objClass->objControlArray[$strControlId]->SetParentControl(null);
                                                                        $objClass->objControlArray[$strControlId]->SetForm(null);
                                                                        $objClass->objControlArray[$strControlId] = null;

                            ElseExpression

                            Since: 1.4.0

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

                            Example

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

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

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

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            /**

                            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 'QForm' in method 'RenderAjax'.
                            Open

                                        $strFormState = QForm::Serialize($this);

                            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 'GetJsFileUri'.
                            Open

                                        return QApplication::GetJsFileUri($strFile);

                            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 '1782', column '9').
                            Open

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

                            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 '506', column '12').
                            Open

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

                            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 'RenderAjax'.
                            Open

                                                QApplication::ExecuteJavaScript($strRender, QJsPriority::High);

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

                                            } else {
                                                $strControlId = $_POST['Qform__FormControl'];
                                            }

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

                                            } else {
                                                $strToReturn  .= '<style type="text/css" media="all">@import "' . $this->GetCssFileUri($strScript) . '"</style>';
                                            }

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

                                                    else {
                                                        $this->Form_Invalid();    // notify form that something went wrong
                                                    }

                            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 'RenderEnd'.
                            Open

                                        $strFormJsFiles = QApplication::RenderFiles();    // Render the form-level javascript files separately

                            StaticAccess

                            Since: 1.4.0

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

                            Example

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

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

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

                                            $objForm = QType::Cast($objForm, 'QForm');

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

                                        } else {
                                            $this->$strMethodName($this, $params['controlId'], $params['param'], $params);
                                        }

                            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 'Render'.
                            Open

                                            QApplication::ExecuteJsFunction('qc.broadcastChange');

                            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 'QWatcher' in method 'Render'.
                            Open

                                        if (QWatcher::WatchersChanged()) {

                            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 '1568', column '9').
                            Open

                                    protected function ProcessJavaScriptList($strJavaScriptFileList)  {
                            
                                        if (empty($strJavaScriptFileList)) return null;
                            
                                        $strArrayToReturn = array();

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

                                        } else {
                                            if(!QApplication::$CliMode) {
                                                return $strToReturn;
                                            } else {
                                                return '';

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

                                            } else {
                                                return '';
                                            }

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

                                                                        } else {
                                                                            $objClass->objControlArray[$strControlId]->SetParentControl($objClass->objControlArray[$strValue]);
                                                                        }

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

                                            } else {
                                                $objControl->RenderAttributeScripts(); // render one-time attribute commands only
                                            }

                            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 'RenderAjax'.
                            Open

                                        $aResponse = array_merge($aResponse, QApplication::GetJavascriptCommandArray());

                            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 'RemoveControl'.
                            Open

                                                QApplication::ExecuteSelectorFunction('#' . $objControl->GetWrapperId(), 'remove');

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

                                        } else {
                                            if(!QApplication::$CliMode) {
                                                return $strToReturn;
                                            } else {
                                                return '';

                            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 '1759', column '10').
                            Open

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

                            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 '1776', column '9').
                            Open

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

                            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 'RenderAjax'.
                            Open

                                            $aResponse = QApplication::GetJavascriptCommandArray();

                            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 'QWatcher' in method 'RenderAjax'.
                            Open

                                        if (QWatcher::WatchersChanged()) {

                            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 'RenderAjax'.
                            Open

                                                QApplication::AddStyleSheets(array_keys($strScriptArray));

                            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 'QControl' in method 'TriggerMethod'.
                            Open

                                            QControl::_CallActionMethod ($objDestControl, $strMethodName, $this->strFormId, $params);

                            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 'RenderEnd'.
                            Open

                                        $strEndScript .= ';' . QApplication::RenderJavascript(false);

                            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 'RenderAjax'.
                            Open

                                                QApplication::ExecuteControlCommand($this->strFormId, 'attr', $attributes);

                            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 'QHtml' in method 'RenderBegin'.
                            Open

                                        $strToReturn .= '<form ' . QHtml::RenderHtmlAttributes($strFormAttributeArray) . ">\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 'QApplication' in method 'InvalidFormState'.
                            Open

                                            QApplication::SendAjaxResponse(['loc' => 'reload']);

                            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 '798', column '9').
                            Open

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (QApplication::$JavascriptExclusiveCommand) {
                                            /**

                            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 '1348', column '13').
                            Open

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

                            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 'RenderEnd'.
                            Open

                                                QApplication::AddJavaScriptFiles($strScriptArray);

                            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 'RenderEnd'.
                            Open

                                        $strEndScript .= QApplication::RenderJavascript(true);

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

                                            } else {
                                                return '';
                                            }

                            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 '1605', column '10').
                            Open

                                    protected function ProcessStyleSheetList($strStyleSheetFileList) {
                                        $strArrayToReturn = array();
                            
                                        // Is there a comma-delimited list of StyleSheet files to include?
                                        if ($strStyleSheetFileList = trim($strStyleSheetFileList)) {

                            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 'GetCssFileUri'.
                            Open

                                        return QApplication::GetCssFileUri($strFile);

                            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 'JavaScriptHelper' in method 'RenderEnd'.
                            Open

                                                    $strControlScript = JavaScriptHelper::TerminateScript($strControlScript);

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

                                        } else {
                                            ob_clean();
                            
                                            QApplication::SendAjaxResponse($aResponse);
                                        }

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

                                        else {
                                            return null;
                                        }

                            ElseExpression

                            Since: 1.4.0

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

                            Example

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

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

                            Avoid using static access to class 'QControl' in method 'TriggerMethod'.
                            Open

                                        $params = QControl::_ProcessActionParams($objSourceControl, $objAction, $mixParameter);

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

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } else {

                            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 'JavaScriptHelper' in method 'RenderEnd'.
                            Open

                                                $strGroupingScript = JavaScriptHelper::TerminateScript($strGroupingScript);

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

                                                } else {
                                                    // Nope -- Throw an exception
                                                    throw new Exception(sprintf('Control passed by Qform__FormControl does not exist: %s', $strControlId));
                                                }

                            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 '1426', column '9').
                            Open

                                    public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                                        $strToReturn = '';
                                        $this->strIncludedStyleSheetFileArray = array();
                            
                                        // Figure out initial list of StyleSheet includes

                            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 '1507', column '9').
                            Open

                                    public function RenderBegin($blnDisplayOutput = true) {
                                        // Ensure that RenderBegin() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                break;

                            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 'RenderEnd'.
                            Open

                                        $strHtml .= QApplication::RenderFiles() . _nl();    // add plugin and control js files

                            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 'RenderEnd'.
                            Open

                                                QApplication::AddStyleSheets(array_keys($strScriptArray));

                            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 'JavaScriptHelper' in method 'RenderEnd'.
                            Open

                                            $strEndScript .= sprintf("qc.regCA(%s); \n", JavaScriptHelper::toJsObject($strControlIdToRegister));

                            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 'QForm' in method 'RenderEnd'.
                            Open

                                        $strHtml .= sprintf('<input type="hidden" name="Qform__FormState" id="Qform__FormState" value="%s" />', QForm::Serialize(clone($this))) . _nl();

                            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 private methods such as 'ctlDesigner_Click'.
                            Open

                                    private function ctlDesigner_Click ($strFormId, $strControlId, $mixParam) {
                                        if (isset($mixParam['id'])) {
                                            $controlId = $mixParam['id'];
                                            if (strpos($controlId, '_')) {    // extra the real control id from a sub id
                                                $controlId = substr($controlId, 0, strpos($controlId, '_'));

                            UnusedPrivateMethod

                            Since: 0.2

                            Unused Private Method detects when a private method is declared but is unused.

                            Example

                            class Something
                            {
                                private function foo() {} // unused
                            }

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

                            Avoid unused parameters such as '$strControlId'.
                            Open

                                    private function ctlDesigner_Click ($strFormId, $strControlId, $mixParam) {

                            UnusedFormalParameter

                            Since: 0.2

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

                            Example

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

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

                            Avoid unused parameters such as '$strFormId'.
                            Open

                                    private function ctlDesigner_Click ($strFormId, $strControlId, $mixParam) {

                            UnusedFormalParameter

                            Since: 0.2

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

                            Example

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

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

                            Avoid unused parameters such as '$key'.
                            Open

                                                array_walk_recursive($val, function(&$v, $key) {

                            UnusedFormalParameter

                            Since: 0.2

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

                            Example

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

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

                            The method InvalidFormState() 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 '$_ITEM'.
                            Open

                                        global $_ITEM;

                            UnusedLocalVariable

                            Since: 0.2

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

                            Example

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

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

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

                                        global $_CONTROL;

                            UnusedLocalVariable

                            Since: 0.2

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

                            Example

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

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

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

                                        global $_FORM;

                            UnusedLocalVariable

                            Since: 0.2

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

                            Example

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

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

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

                                            foreach ($this->objGroupingArray as $strKey => $objGrouping)

                            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

                            TODO found
                            Open

                                                // TODO: Code to automatically execute any PrimaryButton's onclick action, if applicable

                            TODO found
                            Open

                                            // TODO: Output debugging information.

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

                                    public function __get($strName) {
                                        switch ($strName) {
                                            case "FormId": return $this->strFormId;
                                            case "CallType": return $this->strCallType;
                                            case "DefaultWaitIcon": return $this->objDefaultWaitIcon;
                            Severity: Major
                            Found in includes/base_controls/QFormBase.class.php and 3 other locations - About 50 mins to fix
                            includes/base_controls/QImageBrowser.class.php on lines 459..475
                            includes/base_controls/QMenuGen.class.php on lines 389..405
                            includes/base_controls/QNumericTextBox.class.php on lines 126..150

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

                            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

                                        foreach ($strJavaScriptFileList as $strScript) {
                                            if ($strScript = trim($strScript)) {
                            
                                                // Include it if we're NOT ignoring it and it has NOT already been included
                                                if ((array_search($strScript, $this->strIgnoreJavaScriptFileArray) === false) &&
                            Severity: Minor
                            Found in includes/base_controls/QFormBase.class.php and 1 other location - About 30 mins to fix
                            includes/base_controls/QFormBase.class.php on lines 1604..1612

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

                            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

                                            foreach ($strScriptArray as $strScript)
                                                if ($strScript = trim($strScript))
                            
                                                    // Include it if we're NOT ignoring it and it has NOT already been included
                                                    if ((array_search($strScript, $this->strIgnoreStyleSheetFileArray) === false) &&
                            Severity: Minor
                            Found in includes/base_controls/QFormBase.class.php and 1 other location - About 30 mins to fix
                            includes/base_controls/QFormBase.class.php on lines 1567..1577

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

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

                                    protected $strIncludedStyleSheetFileArray = 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 $strIgnoreJavaScriptFileArray. Keep variable name length under 20.
                            Open

                                    protected $strIgnoreJavaScriptFileArray = 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 $strIgnoreStyleSheetFileArray. Keep variable name length under 20.
                            Open

                                    protected $strIgnoreStyleSheetFileArray = 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 $objControlArrayToReturn. Keep variable name length under 20.
                            Open

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

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

                                    protected function ProcessJavaScriptList($strJavaScriptFileList)  {

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

                                    protected $strPreviousRequestMode = 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 $strHtmlIncludeFilePath. Keep variable name length under 20.
                            Open

                                    protected $strHtmlIncludeFilePath;

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

                                    protected $strCustomAttributeArray = 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 $checkableControlValues. Keep variable name length under 20.
                            Open

                                    protected $checkableControlValues = 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 $strPreviousRequestMode. Keep variable name length under 20.
                            Open

                                        $strPreviousRequestMode = $objForm->strPreviousRequestMode;

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

                                    protected $strIncludedJavaScriptFileArray = 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 $strStyleSheetFileList. Keep variable name length under 20.
                            Open

                                    protected function ProcessStyleSheetList($strStyleSheetFileList) {

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

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

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

                                        $a = $this->GetAllControls();

                            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 $v. Configured minimum length is 3.
                            Open

                                                array_walk_recursive($val, function(&$v, $key) {

                            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 $a. Configured minimum length is 3.
                            Open

                                        $a = $this->GetAllControls();

                            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 $f. Configured minimum length is 3.
                            Open

                                            $f = explode('::', $strMethodName);

                            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 FormStatusRenderBegun should be defined in uppercase
                            Open

                                    const FormStatusRenderBegun = 2;

                            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 FormStatusRenderEnded should be defined in uppercase
                            Open

                                    const FormStatusRenderEnded = 3;

                            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 FormStatusUnrendered should be defined in uppercase
                            Open

                                    const FormStatusUnrendered = 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

                            The variable $_FORM is not named in camelCase.
                            Open

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

                            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 function EvaluateTemplate($strTemplate) {
                                        global $_ITEM;
                                        global $_CONTROL;
                                        global $_FORM;
                            
                            

                            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 Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

                            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 Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                    public function EvaluateTemplate($strTemplate) {
                                        global $_ITEM;
                                        global $_CONTROL;
                                        global $_FORM;
                            
                            

                            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 Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                    public function EvaluateTemplate($strTemplate) {
                                        global $_ITEM;
                                        global $_CONTROL;
                                        global $_FORM;
                            
                            

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

                                    public function CheckableControlValue($strControlId) {
                                        if (array_key_exists($strControlId, $this->checkableControlValues)) {
                                            return $this->checkableControlValues[$strControlId];
                                        }
                                        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 RenderAjaxHelper is not named in camelCase.
                            Open

                                    protected function RenderAjaxHelper($objControl) {
                                        $controls = [];
                            
                                        if ($objControl) {
                                            $controls = array_merge($controls, $objControl->RenderAjax());    // will return an array of controls to be merged with current controls

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

                                    protected function Form_Create() {}

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

                                    public function VarExport($blnReturn = true) {
                                        if ($this->objControlArray) foreach ($this->objControlArray as $objControl)
                                            $objControl->VarExport(false);
                                        if ($blnReturn) {
                                            return var_export($this, 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 RemoveControl is not named in camelCase.
                            Open

                                    public function RemoveControl($strControlId) {
                                        if (isset($this->objControlArray[$strControlId])) {
                                            // Get the Control in Question
                                            $objControl = $this->objControlArray[$strControlId];
                            
                            

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

                                    protected function Form_Initialize() {}

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

                                    protected function Form_Invalid() {}

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

                                    public function GetModifiedControls() {
                                        $ret = array_filter ($this->objControlArray, 'QForm::IsControlModified');
                                        return $ret;
                                    }

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

                                    protected function Form_Load() {}

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

                                    protected function Form_PreRender() {}

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

                                    protected function Form_Exit() {}

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

                                    private function ctlDesigner_Click ($strFormId, $strControlId, $mixParam) {
                                        if (isset($mixParam['id'])) {
                                            $controlId = $mixParam['id'];
                                            if (strpos($controlId, '_')) {    // extra the real control id from a sub id
                                                $controlId = substr($controlId, 0, strpos($controlId, '_'));

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

                                    protected function Render() {
                                        if (QWatcher::WatchersChanged()) {
                                            QApplication::ExecuteJsFunction('qc.broadcastChange');
                                        }
                            
                            

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

                                    public function GetCustomAttribute($strName) {
                                        if ((is_array($this->strCustomAttributeArray)) && (array_key_exists($strName, $this->strCustomAttributeArray)))
                                            return $this->strCustomAttributeArray[$strName];
                                        else
                                            throw new QCallerException(sprintf("Custom Attribute does not exist in Form: %s", $strName));

                            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 function GetJsFileUri($strFile) {
                                        return QApplication::GetJsFileUri($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 RemoveCustomAttribute is not named in camelCase.
                            Open

                                    public function RemoveCustomAttribute($strName) {
                                        if ((is_array($this->strCustomAttributeArray)) && (array_key_exists($strName, $this->strCustomAttributeArray))) {
                                            $this->strCustomAttributeArray[$strName] = null;
                                            unset($this->strCustomAttributeArray[$strName]);
                                        } 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 GenerateAjaxActionId is not named in camelCase.
                            Open

                                    public function GenerateAjaxActionId() {
                                        $strToReturn = sprintf('a%s', $this->intNextAjaxActionId);
                                        $this->intNextAjaxActionId++;
                                        return $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 SaveControlState is not named in camelCase.
                            Open

                                    public function SaveControlState() {
                                        // tell the controls to save their state
                                        $a = $this->GetAllControls();
                                        foreach ($a as $control) {
                                            $control->_WriteState();

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

                                    public function AddGrouping(QControlGrouping $objGrouping) {
                                        $strGroupingId = $objGrouping->GroupingId;
                                        if (array_key_exists($strGroupingId, $this->objGroupingArray))
                                            throw new QCallerException(sprintf('A Grouping already exists in the form with the ID: %s', $strGroupingId));
                                        if (array_key_exists($strGroupingId, $this->objControlArray))

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

                                    protected function RenderAjax() {
                                        $aResponse = array();
                            
                                        if (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 AddControl is not named in camelCase.
                            Open

                                    public function AddControl(QControl $objControl) {
                                        $strControlId = $objControl->ControlId;
                                        $objControl->MarkAsModified(); // make sure new controls get drawn
                                        if (array_key_exists($strControlId, $this->objControlArray))
                                            throw new QCallerException(sprintf('A control already exists in the form with the ID: %s', $strControlId));

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

                                    public function SetCustomAttribute($strName, $strValue) {
                                        if ($strName == "method" || $strName == "action")
                                            throw new QCallerException(sprintf("Custom Attribute not supported through SetCustomAttribute(): %s", $strName));
                            
                                        if (!is_null($strValue))

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

                                    public function RemoveGrouping($strGroupingId) {
                                        if (array_key_exists($strGroupingId, $this->objGroupingArray)) {
                                            // Remove this Grouping
                                            unset($this->objGroupingArray[$strGroupingId]);
                                        }

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

                                    public function GetAllGroupings() {
                                        return $this->objGroupingArray;
                                    }

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

                                    public function RenderStyles($blnDisplayOutput = true, $blnInHead = true) {
                                        $strToReturn = '';
                                        $this->strIncludedStyleSheetFileArray = array();
                            
                                        // Figure out initial list of StyleSheet includes

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

                                    public function GetErrorMessages($blnErrorsOnly = false) {
                                        $strToReturn = array();
                                        foreach ($this->GetAllControls() as $objControl) {
                                            if ($objControl->ValidationError)
                                                array_push($strToReturn, $objControl->ValidationError);

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

                                    protected static function IsControlModified ($objControl) {
                                        return $objControl->IsModified();
                                    }

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

                                    public function GenerateControlId() {
                            //            $strToReturn = sprintf('control%s', $this->intNextControlId);
                                        $strToReturn = sprintf('c%s', $this->intNextControlId);
                                        $this->intNextControlId++;
                                        return $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 Run is not named in camelCase.
                            Open

                                    public static function Run($strFormClass, $strAlternateHtmlFile = null, $strFormId = null) {
                                        // See if we can get a Form Class out of PostData
                                        $objClass = null;
                                        if ($strFormId === null) {
                                            $strFormId = $strFormClass;

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

                                    public function GetControl($strControlId) {
                                        if (isset($this->objControlArray[$strControlId])) {
                                            return $this->objControlArray[$strControlId];
                                        }
                                        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 InvalidFormState is not named in camelCase.
                            Open

                                    public static function InvalidFormState() {
                                        //ob_clean();
                                        if (isset($_POST['Qform__FormCallType']) &&  $_POST['Qform__FormCallType'] == QCallType::Ajax) {
                                            QApplication::$ProcessOutput = false;
                                            QApplication::SendAjaxResponse(['loc' => 'reload']);

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

                                    public static function Serialize(QForm $objForm) {
                                        // Get and then Update PreviousRequestMode
                                        $strPreviousRequestMode = $objForm->strPreviousRequestMode;
                                        $objForm->strPreviousRequestMode = QApplication::$RequestMode;
                            
                            

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

                                    protected function RestoreControlState() {
                                        // tell the controls to restore their state
                                        $a = $this->GetAllControls();
                                        foreach ($a as $control) {
                                            $control->_ReadState();

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

                                    public function GetChildControls($objParentObject) {
                                        $objControlArrayToReturn = array();
                            
                                        if ($objParentObject instanceof QForm) {
                                            // They want all the ChildControls for this Form

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

                                    protected function RenderChildren($blnDisplayOutput = true) {
                                        $strToReturn = "";
                            
                                        foreach ($this->GetChildControls($this) as $objControl)
                                            if (!$objControl->Rendered)

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

                                    public function RenderEnd($blnDisplayOutput = true) {
                                        // Ensure that RenderEnd() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                throw new QCallerException('$this->RenderBegin() was never called');

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

                                    protected function Form_Run() {}

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

                                    protected function Form_Validate() {return 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 UnpackPostVar is not named in camelCase.
                            Open

                                    protected static function UnpackPostVar($val) {
                                        if (QApplication::$EncodingType != 'UTF-8' && QApplication::$RequestMode != QRequestMode::Ajax) {
                                            // json_decode only accepts utf-8 encoded text. Ajax calls are already UTF-8 encoded.
                                            $val = iconv(QApplication::$EncodingType, 'UTF-8', $val);
                                        }

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

                                    public function ResetValidationStates() {
                                        foreach ($this->objControlArray as $objControl) {
                                            $objControl->ValidationReset();
                                        }
                                    }

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

                                    public static function Unserialize($strPostDataState) {
                                        // Setup and Call the FormStateHandler to retrieve the Serialized Form
                                        $strFormStateHandler = QForm::$FormStateHandler;
                                        $strSerializedForm = $strFormStateHandler::Load ($strPostDataState);
                            
                            

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

                                    public function GetErrorControls($blnErrorsOnly = false) {
                                        $objToReturn = array();
                                        foreach ($this->GetAllControls() as $objControl) {
                                            if ($objControl->ValidationError)
                                                array_push($objToReturn, $objControl);

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

                                    protected function TriggerMethod($strControlId, $strMethodName, QAction $objAction) {
                                        $mixParameter = $_POST['Qform__FormParameter'];
                                        $objSourceControl = $this->objControlArray[$strControlId];
                                        $params = QControl::_ProcessActionParams($objSourceControl, $objAction, $mixParameter);
                            
                            

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

                                    public function RenderBegin($blnDisplayOutput = true) {
                                        // Ensure that RenderBegin() has not yet been called
                                        switch ($this->intFormStatus) {
                                            case QFormBase::FormStatusUnrendered:
                                                break;

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

                                    public function EvaluateTemplate($strTemplate) {
                                        global $_ITEM;
                                        global $_CONTROL;
                                        global $_FORM;
                            
                            

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

                                    protected function ProcessStyleSheetList($strStyleSheetFileList) {
                                        $strArrayToReturn = array();
                            
                                        // Is there a comma-delimited list of StyleSheet files to include?
                                        if ($strStyleSheetFileList = trim($strStyleSheetFileList)) {

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

                                    public function IsPostBack() {
                                        return ($this->strCallType != QCallType::None);
                                    }

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

                                    protected function GetFormJavaScripts() {
                                        return array (__JQUERY_BASE__,
                                            __JQUERY_EFFECTS__,
                                            'ajaxq/ajaxq.js',
                                            __QCUBED_JS_CORE__);

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

                                    public function CallDataBinder($callable, $objPaginatedControl) {
                                        try {
                                            call_user_func($callable, $objPaginatedControl);
                                        } catch (QCallerException $objExc) {
                                            throw new QDataBindException($objExc);

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

                                    public function GetAllControls() {
                                        return $this->objControlArray;
                                    }

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

                                    protected function ValidateControlAndChildren(QControl $objControl) {
                                        return $objControl->ValidateControlAndChildren();
                                    }

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

                                    protected function TriggerActions($strControlIdOverride = null) {
                                        if (array_key_exists('Qform__FormControl', $_POST)) {
                                            if ($strControlIdOverride) {
                                                $strControlId = $strControlIdOverride;
                                            } 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 GetGrouping is not named in camelCase.
                            Open

                                    public function GetGrouping($strGroupingId) {
                                        if (array_key_exists($strGroupingId, $this->objGroupingArray))
                                            return $this->objGroupingArray[$strGroupingId];
                                        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 ProcessJavaScriptList is not named in camelCase.
                            Open

                                    protected function ProcessJavaScriptList($strJavaScriptFileList)  {
                            
                                        if (empty($strJavaScriptFileList)) return null;
                            
                                        $strArrayToReturn = array();

                            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 function GetCssFileUri($strFile) {
                                        return QApplication::GetCssFileUri($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

                            There are no issues that match your filters.

                            Category
                            Status