qcubed/framework

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

Summary

Maintainability
F
1 wk
Test Coverage

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

ParsePostData accesses the super-global variable $_POST.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();

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

        protected function GetControlHtml() {
            // Ignore Class
            $strCssClass = $this->strCssClass;
            $this->strCssClass = '';
            $strAttributes = $this->GetAttributes();
Severity: Minor
Found in includes/base_controls/QDateTimePicker.class.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function ParsePostData has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
Open

        public function ParsePostData() {

            $blnIsDateTimeSet = false;
            if ($this->dttDateTime == null) {
                $dttNewDateTime = QDateTime::Now();
Severity: Minor
Found in includes/base_controls/QDateTimePicker.class.php - About 7 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

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

<?php
    /**
     * This file contains the QDateTimePicker class.
     *
     * @package Controls
Severity: Minor
Found in includes/base_controls/QDateTimePicker.class.php - About 7 hrs to fix

    Method GetControlHtml has 163 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected function GetControlHtml() {
                // Ignore Class
                $strCssClass = $this->strCssClass;
                $this->strCssClass = '';
                $strAttributes = $this->GetAttributes();
    Severity: Major
    Found in includes/base_controls/QDateTimePicker.class.php - About 6 hrs to fix

      Function Validate has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

              public function Validate() {
                  if ($this->blnRequired) {
                      $blnIsNull = false;
                      
                      if (!$this->dttDateTime)
      Severity: Minor
      Found in includes/base_controls/QDateTimePicker.class.php - About 4 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 __set has 106 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function __set($strName, $mixValue) {
                  $this->blnModified = true;
      
                  switch ($strName) {
                      // MISC
      Severity: Major
      Found in includes/base_controls/QDateTimePicker.class.php - About 4 hrs to fix

        Method ParsePostData has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function ParsePostData() {
        
                    $blnIsDateTimeSet = false;
                    if ($this->dttDateTime == null) {
                        $dttNewDateTime = QDateTime::Now();
        Severity: Major
        Found in includes/base_controls/QDateTimePicker.class.php - About 4 hrs to fix

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

                  public function __set($strName, $mixValue) {
                      $this->blnModified = true;
          
                      switch ($strName) {
                          // MISC
          Severity: Minor
          Found in includes/base_controls/QDateTimePicker.class.php - About 4 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 QDateTimePicker has an overall complexity of 153 which is very high. The configured complexity threshold is 50.
          Open

              class QDateTimePicker extends QControl {
                  ///////////////////////////
                  // Private Member Variables
                  ///////////////////////////
          
          

          The class QDateTimePicker has 16 fields. Consider redesigning QDateTimePicker to keep the number of fields under 15.
          Open

              class QDateTimePicker extends QControl {
                  ///////////////////////////
                  // Private Member Variables
                  ///////////////////////////
          
          

          TooManyFields

          Since: 0.1

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

          Example

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

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

          Method Validate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function Validate() {
                      if ($this->blnRequired) {
                          $blnIsNull = false;
                          
                          if (!$this->dttDateTime)
          Severity: Minor
          Found in includes/base_controls/QDateTimePicker.class.php - About 1 hr to fix

            Method __get has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function __get($strName) {
                        switch ($strName) {
                            // MISC
                            case "DateTime":
                                if (is_null($this->dttDateTime) || $this->dttDateTime->IsNull())
            Severity: Minor
            Found in includes/base_controls/QDateTimePicker.class.php - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                              if ((($this->strDateTimePickerType == QDateTimePickerType::Date) ||
                                      ($this->strDateTimePickerType == QDateTimePickerType::DateTime) ||
                                      ($this->strDateTimePickerType == QDateTimePickerType::DateTimeSeconds )) &&
                                  ($this->intSelectedDay || $this->intSelectedMonth || $this->intSelectedYear) &&
                                  ($this->dttDateTime->IsDateNull())) {
              Severity: Major
              Found in includes/base_controls/QDateTimePicker.class.php - About 1 hr to fix

                Avoid too many return statements within this method.
                Open

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

                  Avoid too many return statements within this method.
                  Open

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

                    Avoid too many return statements within this method.
                    Open

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

                      Avoid too many return statements within this method.
                      Open

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

                        Avoid too many return statements within this method.
                        Open

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

                          Avoid too many return statements within this method.
                          Open

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

                            Avoid too many return statements within this method.
                            Open

                                            case "HourInterval": return $this->intHourInterval;
                            Severity: Major
                            Found in includes/base_controls/QDateTimePicker.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/QDateTimePicker.class.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

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

                                  The method GetControlHtml() has an NPath complexity of 11327778912. The configured NPath complexity threshold is 200.
                                  Open

                                          protected function GetControlHtml() {
                                              // Ignore Class
                                              $strCssClass = $this->strCssClass;
                                              $this->strCssClass = '';
                                              $strAttributes = $this->GetAttributes();

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

                                          protected function GetControlHtml() {
                                              // Ignore Class
                                              $strCssClass = $this->strCssClass;
                                              $this->strCssClass = '';
                                              $strAttributes = $this->GetAttributes();

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

                                          public function __set($strName, $mixValue) {
                                              $this->blnModified = true;
                                  
                                              switch ($strName) {
                                                  // MISC

                                  The method ParsePostData() has an NPath complexity of 80520. The configured NPath complexity threshold is 200.
                                  Open

                                          public function ParsePostData() {
                                  
                                              $blnIsDateTimeSet = false;
                                              if ($this->dttDateTime == null) {
                                                  $dttNewDateTime = QDateTime::Now();

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

                                          public function ParsePostData() {
                                  
                                              $blnIsDateTimeSet = false;
                                              if ($this->dttDateTime == null) {
                                                  $dttNewDateTime = QDateTime::Now();

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

                                          public function __set($strName, $mixValue) {
                                              $this->blnModified = true;
                                  
                                              switch ($strName) {
                                                  // MISC

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

                                          public function __get($strName) {
                                              switch ($strName) {
                                                  // MISC
                                                  case "DateTime":
                                                      if (is_null($this->dttDateTime) || $this->dttDateTime->IsNull())

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

                                          public function ParsePostData() {
                                  
                                              $blnIsDateTimeSet = false;
                                              if ($this->dttDateTime == null) {
                                                  $dttNewDateTime = QDateTime::Now();

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

                                          protected function GetControlHtml() {
                                              // Ignore Class
                                              $strCssClass = $this->strCssClass;
                                              $this->strCssClass = '';
                                              $strAttributes = $this->GetAttributes();

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

                                          public function Validate() {
                                              if ($this->blnRequired) {
                                                  $blnIsNull = false;
                                                  
                                                  if (!$this->dttDateTime)

                                  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

                                  Missing class import via use statement (line '213', column '24').
                                  Open

                                                  $dttDateTime = new QDateTime();

                                  MissingImport

                                  Since: 2.7.0

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

                                  Example

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

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

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

                                                              QApplication::Translate(strftime("%b", mktime(0, 0, 0, $intMonth, 1, 2000))));

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

                                                          $this->intHourInterval = QType::Cast($mixValue, QType::Integer);

                                  StaticAccess

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      } else {
                                                          if ($blnIsDateTimeSet) {
                                                              $intYear = $dttNewDateTime->Year;
                                                          } else {
                                                              $intYear = null;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          $this->intMinuteInterval = QType::Cast($mixValue, QType::Integer);

                                  StaticAccess

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                  else {
                                                      if ((($this->strDateTimePickerType == QDateTimePickerType::Date) ||
                                                              ($this->strDateTimePickerType == QDateTimePickerType::DateTime) ||
                                                              ($this->strDateTimePickerType == QDateTimePickerType::DateTimeSeconds )) &&
                                                          ($this->dttDateTime->IsDateNull()))

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

                                                      } else {
                                                          if ($blnIsDateTimeSet) {
                                                              $intDay = $dttNewDateTime->Day;
                                                          } else {
                                                              $intDay = null;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          } else {
                                                              $intYear = null;
                                                          }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          } else {
                                                              $intHour = null;
                                                          }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                              } else {
                                                                  $intSecond = 0;
                                                              }

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

                                                          $this->ValidationError = sprintf(QApplication::Translate('%s is required'), $this->strName);

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

                                                          $this->intSecondInterval = QType::Cast($mixValue, QType::Integer);

                                  StaticAccess

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      } else {
                                                          if($blnIsTimeSet){
                                                              $intHour = $dttNewDateTime->Hour;
                                                          } else {
                                                              $intHour = null;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      } else {
                                                          $dttNewDateTime->Hour = 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 'QApplication' in method 'Validate'.
                                  Open

                                                          $this->ValidationError = QApplication::Translate('Required');

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

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

                                              } else {
                                                  $blnIsDateTimeSet = true;
                                                  $dttNewDateTime = $this->dttDateTime;
                                              }

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

                                                              } else {
                                                                  // It's ok just to have the "--" marks and nothing else
                                                                  $strDayListbox .= '<option value="">--</option>';
                                                              }

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

                                                      } else {
                                                          if ($blnIsDateTimeSet) {
                                                              $intMonth = $dttNewDateTime->Month;
                                                          } else {
                                                              $intMonth = null;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      } else {
                                                          if($blnIsTimeSet){
                                                              $intMinute = $dttNewDateTime->Minute;
                                                          } else {
                                                              $intMinute = null;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          } else {
                                                              if ($blnIsTimeSet) {
                                                                  $intSecond = $dttNewDateTime->Second;
                                                              } else {
                                                                  $intSecond = 0;

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          $this->intMaximumYear = 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

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

                                                          $this->blnAllowBlankDate = QType::Cast($mixValue, QType::Boolean);

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

                                                          $this->strTimeSeparator = 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

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

                                                      $this->ValidationError = QApplication::Translate('Invalid Date');

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

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

                                                          } else {
                                                              // New DateTime -- but we are NOT required
                                                              
                                                              // See if a month has been selected yet.
                                                              if ($this->intSelectedMonth) {

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

                                              } else {
                                                  $dttDateTime = new QDateTime();
                                              }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          $this->blnAllowBlankTime = QType::Cast($mixValue, QType::Boolean);

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

                                                          } else {
                                                              $intDay = null;
                                                          }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      } else {
                                                          $dttNewDateTime->Year = null;
                                                      }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                              } else {
                                                  // TIME IS NULL
                                                  $blnIsTimeSet = false;
                                              }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                      else {
                                                          $objToReturn = clone($this->dttDateTime);
                                                          return $objToReturn;
                                                      }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          $this->intMinimumYear = 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

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

                                                  $dttNewDateTime = QDateTime::Now();

                                  StaticAccess

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          } else {
                                                              $intMonth = null;
                                                          }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                                          $dttDate = QType::Cast($mixValue, QType::DateTime);

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

                                                          } else {
                                                              $intMinute = null;
                                                          }

                                  ElseExpression

                                  Since: 1.4.0

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

                                  Example

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

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

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

                                              } else {
                                                  if ((($this->strDateTimePickerType == QDateTimePickerType::Date) ||
                                                          ($this->strDateTimePickerType == QDateTimePickerType::DateTime) ||
                                                          ($this->strDateTimePickerType == QDateTimePickerType::DateTimeSeconds )) &&
                                                      ($this->intSelectedDay || $this->intSelectedMonth || $this->intSelectedYear) &&

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

                                                      } else {
                                                          $intDaysInMonth = $dttDateTime->PHPDate('t');
                                                          for ($intDay = 1; $intDay <= $intDaysInMonth; $intDay++) {
                                                              if (($dttDateTime->Day == $intDay) || ($this->intSelectedDay == $intDay))
                                                                  $strSelected = ' selected="selected"';

                                  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 excessively long variable names like $strDateTimePickerFormat. Keep variable name length under 20.
                                  Open

                                          protected $strDateTimePickerFormat = QDateTimePickerFormat::MonthDayYear;

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

                                          protected $strDateTimePickerType = QDateTimePickerType::Date;

                                  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

                                  The method GetControlHtml is not named in camelCase.
                                  Open

                                          protected function GetControlHtml() {
                                              // Ignore Class
                                              $strCssClass = $this->strCssClass;
                                              $this->strCssClass = '';
                                              $strAttributes = $this->GetAttributes();

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

                                          public function Validate() {
                                              if ($this->blnRequired) {
                                                  $blnIsNull = false;
                                                  
                                                  if (!$this->dttDateTime)

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

                                          public function ParsePostData() {
                                  
                                              $blnIsDateTimeSet = false;
                                              if ($this->dttDateTime == null) {
                                                  $dttNewDateTime = QDateTime::Now();

                                  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