XoopsModules25x/xfguestbook

View on GitHub
index.php

Summary

Maintainability
C
1 day
Test Coverage

Function xfgb_getmsg has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

function xfgb_getmsg($msg)
{
    global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
    /** @var Helper $helper */
    $helper = Helper::getInstance();
Severity: Minor
Found in index.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

File index.php has 283 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
//
//  ------------------------------------------------------------------------ //
//             XF Guestbook                                                  //
// ------------------------------------------------------------------------- //
Severity: Minor
Found in index.php - About 2 hrs to fix

    Method xfgb_getmsg has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function xfgb_getmsg($msg)
    {
        global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
        /** @var Helper $helper */
        $helper = Helper::getInstance();
    Severity: Major
    Found in index.php - About 2 hrs to fix

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

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.php - About 35 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      The function xfgb_getmsg() has an NPath complexity of 1153. The configured NPath complexity threshold is 200.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 xfgb_getmsg() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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

      Missing class import via use statement (line '183', column '21').
      Open

          $criteria = new \Criteria('moderate', 0);
      Severity: Minor
      Found in index.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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  $messagesent = MD_XFGUESTBOOK_ERRORDEL;
              }
      Severity: Minor
      Found in index.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 '\Xmf\Request' in method 'delete'.
      Open

          $ok = Request::getInt('ok', 0, 'POST');
      Severity: Minor
      Found in index.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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              xoops_confirm(['op' => 'delete', 'msg_id' => $msg_id, 'ok' => 1], 'index.php', _DELETE);
          }
      Severity: Minor
      Found in index.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 approve uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
              $messagesent = MD_XFGUESTBOOK_VALIDATE;
          }
      Severity: Minor
      Found in index.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 xfgb_genderlist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  $gender[$i] = MD_XFGUESTBOOK_UNKNOW2 . '<br>';
                  $gender[$i] .= '<img src="assets/images/U.gif"><br><br>';
                  $gender[$i] .= $v . MD_XFGUESTBOOK_MESSAGES;
              }
      Severity: Minor
      Found in index.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\Xfguestbook\Helper' in method 'xfgb_getmsg'.
      Open

          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 '\XoopsModules\Xfguestbook\Utility' in method 'xfgb_getmsg'.
      Open

          $arr_country = Xfguestbook\Utility::getAllCountry();
      Severity: Minor
      Found in index.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 xfgb_getmsg uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                      } else {
                          $a_msg['country'] = $country_name;
                      }
      Severity: Minor
      Found in index.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\Xfguestbook\Utility' in method 'xfgb_getmsg'.
      Open

              $poster = Xfguestbook\Utility::get_user_data($onemsg->getVar('user_id'));
      Severity: Minor
      Found in index.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 xfgb_getmsg uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                  } else {
                      $a_msg['country'] = $onemsg->getVar('other');
                  }
      Severity: Minor
      Found in index.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\Xfguestbook\Helper' in method 'xfgb_genderlist'.
      Open

          $helper   = Helper::getInstance();
      Severity: Minor
      Found in index.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 xfgb_getmsg uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  $a_msg             = [];
                  $a_msg['poster']   = $onemsg->getVar('uname');
                  $a_msg['rank']     = '';
                  $a_msg['rank_img'] = '';
      Severity: Minor
      Found in index.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 '$xoopsConfig'.
      Open

          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
      Severity: Minor
      Found in index.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 unused local variables such as '$xoopsDB'.
      Open

          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
      Severity: Minor
      Found in index.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 unused local variables such as '$opt'.
      Open

          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
      Severity: Minor
      Found in index.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 unused local variables such as '$xoopsModule'.
      Open

          global $options, $xoopsTpl, $xoopsModule, $msgHandler;
      Severity: Minor
      Found in index.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 unused local variables such as '$helper'.
      Open

          $helper   = Helper::getInstance();
      Severity: Minor
      Found in index.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

      The parameter $msg_id is not named in camelCase.
      Open

      function approve($msg_id)
      {
          global $msgHandler;
      
          $msg = $msgHandler->get($msg_id);
      Severity: Minor
      Found in index.php by phpmd

      CamelCaseParameterName

      Since: 0.2

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

      Example

      class ClassName {
          public function doSomething($user_name) {
          }
      }

      Source

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

          $ok = Request::getInt('ok', 0, 'POST');
      Severity: Minor
      Found in index.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

      The parameter $msg_id is not named in camelCase.
      Open

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.php by phpmd

      CamelCaseParameterName

      Since: 0.2

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

      Example

      class ClassName {
          public function doSomething($user_name) {
          }
      }

      Source

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

      <?php
      Severity: Minor
      Found in index.php by phpcodesniffer

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

          $i        = 0;
      Severity: Minor
      Found in index.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

      Line exceeds 120 characters; contains 180 characters
      Open

                      $a_msg['country'] = '<a href="index.php?op=show_country&param=' . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . '">' . $a_msg['country'] . '</a>';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 205 characters
      Open

              $xoopsTpl->assign('msg_moderate_text', sprintf(MD_XFGUESTBOOK_MODERATING, "<span class='fg2'><a href='" . XOOPS_URL . "/modules/xfguestbook/index.php?op=show_waiting'>" . $nbwait . '</a></span>'));
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 170 characters
      Open

                  $a_msg['url'] = '<a href="' . $onemsg->getVar('url') . '" target="_blank"><img src="' . XOOPS_URL . '/images/icons/www.gif" alt="' . _VISITWEBSITE . '"></a>';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 128 characters
      Open

              $pagenav = new \XoopsPageNav($nbmsg, $helper->getConfig('perpage'), $debut, 'debut', 'op=show_country&param=' . $param);
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 175 characters
      Open

                  $a_msg['gender'] = '<a href="index.php?op=show_gender&param=' . $onemsg->getVar('gender') . '"><img src="assets/images/' . $onemsg->getVar('gender') . '.gif"</a>';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 274 characters
      Open

                  $a_msg['email'] = "<a href=\"javascript:openWithSelfMain('" . XOOPS_URL . '/modules/xfguestbook/contact.php?msg_id=' . $onemsg->getVar('msg_id') . '\', \'contact\', 600, 450);"><img src="' . XOOPS_URL . '/images/icons/email.gif" alt="' . _SENDEMAILTO . '"></a>';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 170 characters
      Open

              $opt['<a href="index.php?op=show_country&param=' . $helper->getConfig('flagdir') . '/' . $coun['country_code'] . '">' . $coun['country_name'] . '</a>'] = $tlocal;
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 179 characters
      Open

                      $flag = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/assets/images/flags/' . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . '.gif';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 214 characters
      Open

                          $a_msg['country'] = '<img src="' . XOOPS_URL . '/modules/xfguestbook/assets/images/flags/' . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . '.gif" alt="' . $country_name . '">';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 136 characters
      Open

          $sql2 = 'SELECT COUNT(country) tot FROM ' . $xoopsDB->prefix('xfguestbook_msg') . " WHERE country='" . $coun['country_code'] . '\'';
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 127 characters
      Open

              $pagenav = new \XoopsPageNav($nbmsg, $helper->getConfig('perpage'), $debut, 'debut', 'op=show_gender&param=' . $param);
      Severity: Minor
      Found in index.php by phpcodesniffer

      Line exceeds 120 characters; contains 170 characters
      Open

                  $a_msg['local'] = '<a href="index.php?op=show_country&param=' . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . '">' . $country_name . '</a>';
      Severity: Minor
      Found in index.php by phpcodesniffer

      The variable $del_msg_ok is not named in camelCase.
      Open

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.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 $del_msg_ok is not named in camelCase.
      Open

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.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 $msg_id is not named in camelCase.
      Open

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.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 $msg_id is not named in camelCase.
      Open

      function approve($msg_id)
      {
          global $msgHandler;
      
          $msg = $msgHandler->get($msg_id);
      Severity: Minor
      Found in index.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 $msg_id is not named in camelCase.
      Open

      function delete($msg_id)
      {
          global $msgHandler, $xoopsModule;
          $ok = Request::getInt('ok', 0, 'POST');
          if (1 == $ok) {
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $arr_country is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $arr_msg is not named in camelCase.
      Open

      function xfgb_genderlist()
      {
          global $options, $xoopsTpl, $xoopsModule, $msgHandler;
          /** @var Helper $helper */
          $helper   = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $arr_country is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $arr_country is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $country_name is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $arr_msg is not named in camelCase.
      Open

      function xfgb_genderlist()
      {
          global $options, $xoopsTpl, $xoopsModule, $msgHandler;
          /** @var Helper $helper */
          $helper   = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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 $a_msg is not named in camelCase.
      Open

      function xfgb_getmsg($msg)
      {
          global $nbmsg, $xoopsModule, $xoopsUser, $xoopsTpl, $xoopsConfig, $options, $opt, $xoopsDB;
          /** @var Helper $helper */
          $helper = Helper::getInstance();
      Severity: Minor
      Found in index.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