XoopsModules25x/xoopspoll

View on GitHub
blocks/singlepoll.php

Summary

Maintainability
D
3 days
Test Coverage

xoopspollBlockSinglepollShow accesses the super-global variable $_SERVER.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

xoopspollBlockSinglepollShow accesses the super-global variable $_SERVER.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

xoopspollBlockSinglepollShow accesses the super-global variable $_SERVER.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

xoopspollBlockSinglepollShow accesses the super-global variable $GLOBALS.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

xoopspollBlockSinglepollShow accesses the super-global variable $GLOBALS.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

xoopspollBlockSinglepollShow accesses the super-global variable $GLOBALS.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.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

Function xoopspollBlockSinglepollShow has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Minor
Found in blocks/singlepoll.php - About 6 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 xoopspollBlockSinglepollShow has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoopspollBlockSinglepollShow(mixed $options): array
{
    $block = [];

    /** @var \XoopsConfigHandler $configHandler */
Severity: Major
Found in blocks/singlepoll.php - About 4 hrs to fix

    Method xoopspollBlockSinglepollEdit has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function xoopspollBlockSinglepollEdit(mixed $options): string
    {
        /**
         * Options[]
         *            0 = show expired polls in block
    Severity: Major
    Found in blocks/singlepoll.php - About 4 hrs to fix

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

      function xoopspollBlockSinglepollEdit(mixed $options): string
      {
          /**
           * Options[]
           *            0 = show expired polls in block
      Severity: Minor
      Found in blocks/singlepoll.php - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      The function xoopspollBlockSinglepollEdit() has an NPath complexity of 480. The configured NPath complexity threshold is 200.
      Open

      function xoopspollBlockSinglepollEdit(mixed $options): string
      {
          /**
           * Options[]
           *            0 = show expired polls in block
      Severity: Minor
      Found in blocks/singlepoll.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 function xoopspollBlockSinglepollShow() has an NPath complexity of 2331. The configured NPath complexity threshold is 200.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.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 function xoopspollBlockSinglepollEdit() has 144 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

      function xoopspollBlockSinglepollEdit(mixed $options): string
      {
          /**
           * Options[]
           *            0 = show expired polls in block
      Severity: Minor
      Found in blocks/singlepoll.php by phpmd

      The function xoopspollBlockSinglepollShow() has 150 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.php by phpmd

      The function xoopspollBlockSinglepollShow() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.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

      The function xoopspollBlockSinglepollEdit() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
      Open

      function xoopspollBlockSinglepollEdit(mixed $options): string
      {
          /**
           * Options[]
           *            0 = show expired polls in block
      Severity: Minor
      Found in blocks/singlepoll.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 '$timeArray' which will lead to PHP notices.
      Open

                  unset($optionsObjArray, $pollOptionsArray, $pollObj, $pollVars, $timeArray);
      Severity: Minor
      Found in blocks/singlepoll.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 '76', column '59').
      Open

                      $tArray       = $topicHandler->getAll(new \Criteria('topic_haspoll', 0, '>'), $tFields, false);
      Severity: Minor
      Found in blocks/singlepoll.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 '84', column '41').
      Open

                              $criteria = new \Criteria('poll_id', $tstring, 'NOT IN');
      Severity: Minor
      Found in blocks/singlepoll.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 '121', column '32').
      Open

                  $criteria->add(new \Criteria('poll_id', $pollVars['poll_id'], '='));
      Severity: Minor
      Found in blocks/singlepoll.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 '271', column '55').
      Open

                  $tArray       = $topicHandler->getAll(new \Criteria('topic_haspoll', 0, '>'), $tFields, false);
      Severity: Minor
      Found in blocks/singlepoll.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 '279', column '40').
      Open

                          $criteria->add(new \Criteria('poll_id', $tstring, 'NOT IN'));
      Severity: Minor
      Found in blocks/singlepoll.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 '120', column '29').
      Open

                  $criteria = new \CriteriaCompo();
      Severity: Minor
      Found in blocks/singlepoll.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 '243', column '24').
      Open

          $criteria    = new \CriteriaCompo();
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollShow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  return $block;
              }
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollShow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                  } else {
                      $pollOptionType = 'radio';
                      $pollOptionName = 'option_id';
                  }
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $form .= "<select name='options[1]'>\n";
              foreach ($allPollsArray as $thisPoll) {
                  $selected       = ($thisPoll['poll_id'] === $options[1]) ? ' selected' : '';
                  $taggedQuestion = ($thisPoll['end_time'] < time()) ? $thisPoll['question'] . '**' : $thisPoll['question'];
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $chk2no  = '';
              $chk2yes = ' checked';
          }
      Severity: Minor
      Found in blocks/singlepoll.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\Utility' in method 'xoopspollBlockSinglepollShow'.
      Open

                  $block['commentMode'] = Utility::commentMode();
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $chk0no  = '';
              $chk0yes = ' checked';
          }
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollShow uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $pollObj = $pollHandler->get((int)$options[1]);
          }
      Severity: Minor
      Found in blocks/singlepoll.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 xoopspollBlockSinglepollEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $chk3select = '';
              $chk3list   = ' checked';
          }
      Severity: Minor
      Found in blocks/singlepoll.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 unused local variables such as '$timeArray'.
      Open

                  unset($optionsObjArray, $pollOptionsArray, $pollObj, $pollVars, $timeArray);
      Severity: Minor
      Found in blocks/singlepoll.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

      TODO found
      Open

                      /*@TODO::  Change block templates to use Smarty html_options to support this... then comment
      Severity: Minor
      Found in blocks/singlepoll.php by fixme

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

              if ($newbbModule instanceof \XoopsModule && $newbbModule->isactive()) {
                  /** @var Newbb\TopicHandler $topicHandler */
                  $topicHandler = Newbb\Helper::getInstance()->getHandler('Topic');
                  $tFields      = ['topic_id', 'poll_id'];
                  $tArray       = $topicHandler->getAll(new \Criteria('topic_haspoll', 0, '>'), $tFields, false);
      Severity: Major
      Found in blocks/singlepoll.php and 1 other location - About 4 hrs to fix
      index.php on lines 100..116

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 180.

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

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

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

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

      Refactorings

      Further Reading

      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 48 and the first side effect is on line 28.
      Open

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

      There must be one USE keyword per declaration
      Open

      use XoopsModules\Xoopspoll\{
      Severity: Minor
      Found in blocks/singlepoll.php by phpcodesniffer

      Line exceeds 120 characters; contains 148 characters
      Open

                  $block['url']             = 'http' . (!empty($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
      Severity: Minor
      Found in blocks/singlepoll.php by phpcodesniffer

      Line exceeds 120 characters; contains 139 characters
      Open

                      //                $percent = ($totalVotes > 0) ? ceil(100 * $optionObj->getVar('option_count') / $totalVotes) . '%' : '0%';
      Severity: Minor
      Found in blocks/singlepoll.php by phpcodesniffer

      Line exceeds 120 characters; contains 126 characters
      Open

                  $form           .= "  <option value='" . $thisPoll['poll_id'] . "'{$selected}>" . $taggedQuestion . "</option>\n";
      Severity: Minor
      Found in blocks/singlepoll.php by phpcodesniffer

      The variable $lang_multi is not named in camelCase.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.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 $lang_multi is not named in camelCase.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.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 $lang_multi is not named in camelCase.
      Open

      function xoopspollBlockSinglepollShow(mixed $options): array
      {
          $block = [];
      
          /** @var \XoopsConfigHandler $configHandler */
      Severity: Minor
      Found in blocks/singlepoll.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