XoopsModules25x/xoopspoll

View on GitHub
class/Renderer.php

Summary

Maintainability
B
5 hrs
Test Coverage

assignResults accesses the super-global variable $GLOBALS.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Minor
Found in class/Renderer.php by phpmd

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

assignForm accesses the super-global variable $GLOBALS.
Open

    public function assignForm(\XoopsTpl $tpl): void
    {
        $myts       = \MyTextSanitizer::getInstance();
        $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));

Severity: Minor
Found in class/Renderer.php by phpmd

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

assignResults accesses the super-global variable $GLOBALS.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Minor
Found in class/Renderer.php by phpmd

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

assignResults accesses the super-global variable $GLOBALS.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Minor
Found in class/Renderer.php by phpmd

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

assignResults accesses the super-global variable $GLOBALS.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Minor
Found in class/Renderer.php by phpmd

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

assignResults accesses the super-global variable $GLOBALS.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Minor
Found in class/Renderer.php by phpmd

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

assignForm accesses the super-global variable $GLOBALS.
Open

    public function assignForm(\XoopsTpl $tpl): void
    {
        $myts       = \MyTextSanitizer::getInstance();
        $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));

Severity: Minor
Found in class/Renderer.php by phpmd

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

assignForm accesses the super-global variable $GLOBALS.
Open

    public function assignForm(\XoopsTpl $tpl): void
    {
        $myts       = \MyTextSanitizer::getInstance();
        $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));

Severity: Minor
Found in class/Renderer.php by phpmd

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

assignForm accesses the super-global variable $GLOBALS.
Open

    public function assignForm(\XoopsTpl $tpl): void
    {
        $myts       = \MyTextSanitizer::getInstance();
        $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));

Severity: Minor
Found in class/Renderer.php by phpmd

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

assignForm accesses the super-global variable $GLOBALS.
Open

    public function assignForm(\XoopsTpl $tpl): void
    {
        $myts       = \MyTextSanitizer::getInstance();
        $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));

Severity: Minor
Found in class/Renderer.php by phpmd

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

Method assignResults has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function assignResults(\XoopsTpl $tpl): void
    {
        $myts             = \MyTextSanitizer::getInstance();
        $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
        $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
Severity: Major
Found in class/Renderer.php - About 2 hrs to fix

    Method assignForm has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function assignForm(\XoopsTpl $tpl): void
        {
            $myts       = \MyTextSanitizer::getInstance();
            $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));
    
    
    Severity: Minor
    Found in class/Renderer.php - About 1 hr to fix

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

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          public function assignForm(\XoopsTpl $tpl): void
          {
              $myts       = \MyTextSanitizer::getInstance();
              $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));
      
      
      Severity: Minor
      Found in class/Renderer.php - About 25 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      The method assignResults() has an NPath complexity of 216. The configured NPath complexity threshold is 200.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

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

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CyclomaticComplexity

      Since: 0.1

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

      Example

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

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

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

                  $options[] = [
      Severity: Minor
      Found in class/Renderer.php by phpmd

      UndefinedVariable

      Since: 2.8.0

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

      Example

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

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

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

                                   'options'     => $options ?? [],
      Severity: Minor
      Found in class/Renderer.php by phpmd

      UndefinedVariable

      Since: 2.8.0

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

      Example

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

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

      Missing class import via use statement (line '156', column '22').
      Open

              $myTpl = new \XoopsTpl();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

      Missing class import via use statement (line '86', column '22').
      Open

              $myTpl = new \XoopsTpl();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

      Missing class import via use statement (line '177', column '25').
      Open

              $criteria = new \CriteriaCompo();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

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

              $criteria->add(new \Criteria('poll_id', $this->pollObj->getVar('poll_id'), '='));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

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

              } else {
                  $totalVotes = $totalVoters = '';
              }
      Severity: Minor
      Found in class/Renderer.php by phpmd

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

                  } else {
                      $options[$i]['image'] = '';
                  }
      Severity: Minor
      Found in class/Renderer.php by phpmd

      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 'XoopsModules\Xoopspoll\Helper' in method '__construct'.
      Open

              $this->helper = $helper ?? Helper::getInstance();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

              } else {
                  $this->pollObj = $this->pollHandler->create();
              }
      Severity: Minor
      Found in class/Renderer.php by phpmd

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

              } else {
                  $optionType = 'radio';
                  $optionName = 'option_id';
              }
      Severity: Minor
      Found in class/Renderer.php by phpmd

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

                  } else {
                      $options[$i]['percent'] = \sprintf(' %01.1f%%', $percent);
                  }
      Severity: Minor
      Found in class/Renderer.php by phpmd

      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 '\MyTextSanitizer' in method 'assignForm'.
      Open

              $myts       = \MyTextSanitizer::getInstance();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      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 '\MyTextSanitizer' in method 'assignResults'.
      Open

              $myts             = \MyTextSanitizer::getInstance();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

              $myts             = \MyTextSanitizer::getInstance();
      Severity: Minor
      Found in class/Renderer.php by phpmd

      UnusedLocalVariable

      Since: 0.2

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

      Example

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

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

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

              $i            = 0;
      Severity: Minor
      Found in class/Renderer.php by phpmd

      ShortVariable

      Since: 0.2

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

      Example

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

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

      A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 49 and the first side effect is on line 44.
      Open

      <?php declare(strict_types=1);
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      There must be one USE keyword per declaration
      Open

      use XoopsModules\Xoopspoll\{
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 148 characters
      Open

                                             'description'  => $myts->displayTarea($myts->undoHtmlSpecialChars($this->pollObj->getVar('description')), 1))
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 126 characters
      Open

                                   'question'    => \htmlspecialchars($this->pollObj->getVar('question'), \ENT_QUOTES | \ENT_HTML5),
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 156 characters
      Open

                                   'viewresults' => $GLOBALS['xoops']->url('modules/xoopspoll/pollresults.php') . '?poll_id=' . $this->pollObj->getVar('poll_id'),
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 126 characters
      Open

              //        return $myTpl->fetch($GLOBALS['xoops']->path('modules/xoopspoll/templates/xoopspoll_results_renderer.tpl'));
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 254 characters
      Open

                      $options[$i]['image'] = "<img src='" . $GLOBALS['xoops']->url("modules/xoopspoll/assets/images/colorbars/{$optionVars['option_color']}'") . " style='height: 14px; width: {$width}px; vertical-align: middle;' alt='" . (int)$percent . "%'>";
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 137 characters
      Open

                      'input' => "<input type='{$optionType}' " . "name='{$optionName}' " . "value='" . $optionObj->getVar('option_id') . "'>",
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 167 characters
      Open

                                             'viewresults'  => $GLOBALS['xoops']->url("modules/xoopspoll/pollresults.php") . "?poll_id=" . $this->pollObj->getVar('poll_id'),
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 180 characters
      Open

                  $vote = "<a href='" . $GLOBALS['xoops']->url('modules/xoopspoll/index.php') . '?poll_id=' . $this->pollObj->getVar('poll_id') . "'>" . \_MD_XOOPSPOLL_VOTE_NOW . '</a>';
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 163 characters
      Open

                  //            redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), Constants::REDIRECT_DELAY_MEDIUM, _MD_XOOPSPOLL_ERROR_OPTIONS_MISSING);
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      Line exceeds 120 characters; contains 137 characters
      Open

                                   'description' => $myts->displayTarea($myts->undoHtmlSpecialChars($this->pollObj->getVar('description')), 1),
      Severity: Minor
      Found in class/Renderer.php by phpcodesniffer

      The variable $module_id is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $module_id is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $can_vote is not named in camelCase.
      Open

          public function assignForm(\XoopsTpl $tpl): void
          {
              $myts       = \MyTextSanitizer::getInstance();
              $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));
      
      
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $can_vote is not named in camelCase.
      Open

          public function assignForm(\XoopsTpl $tpl): void
          {
              $myts       = \MyTextSanitizer::getInstance();
              $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));
      
      
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $xp_config is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $can_vote is not named in camelCase.
      Open

          public function assignForm(\XoopsTpl $tpl): void
          {
              $myts       = \MyTextSanitizer::getInstance();
              $optionObjs = $this->optionHandler->getAllByPollId($this->pollObj->getVar('poll_id'));
      
      
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $xp_module is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $xp_config is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $xp_config is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      The variable $xp_module is not named in camelCase.
      Open

          public function assignResults(\XoopsTpl $tpl): void
          {
              $myts             = \MyTextSanitizer::getInstance();
              $xuEndTimestamp   = \xoops_getUserTimestamp($this->pollObj->getVar('end_time'));
              $xuEndFormatted   = \ucfirst(\date(_MEDIUMDATESTRING, (int)$xuEndTimestamp));
      Severity: Minor
      Found in class/Renderer.php by phpmd

      CamelCaseVariableName

      Since: 0.2

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

      Example

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

      Source

      There are no issues that match your filters.

      Category
      Status