XoopsModules25x/userlog

View on GitHub
class/setting.php

Summary

Maintainability
F
3 days
Test Coverage

getOptions accesses the super-global variable $_FILES.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $GLOBALS.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_POST.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_COOKIE.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_REQUEST.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_GET.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SESSION.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $GLOBALS.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_ENV.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $GLOBALS.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $GLOBALS.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $_SERVER.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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

getOptions accesses the super-global variable $GLOBALS.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Minor
Found in class/setting.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 getOptions has 227 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getOptions($option = null, $V = 'value')
    {
        $V = strtolower($V);

        if ($this->userlog->getUser()) {
Severity: Major
Found in class/setting.php - About 1 day to fix

    File setting.php has 449 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /*
     You may not change or alter any portion of this comment or credits
     of supporting developers from this source code or any supporting source code
     which is considered copyrighted (c) material of the original comment or credit authors.
    Severity: Minor
    Found in class/setting.php - About 6 hrs to fix

      The class UserlogSetting has an overall complexity of 61 which is very high. The configured complexity threshold is 50.
      Open

      class UserlogSetting extends XoopsObject
      {
          /**
           * @var string
           */
      Severity: Minor
      Found in class/setting.php by phpmd

      Method getSet has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getSet()
          {
              $options = '';
              // if uid setting exist in File
              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
      Severity: Major
      Found in class/setting.php - About 2 hrs to fix

        Function getSet has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getSet()
            {
                $options = '';
                // if uid setting exist in File
                $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
        Severity: Minor
        Found in class/setting.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 getOptions has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getOptions($option = null, $V = 'value')
            {
                $V = strtolower($V);
        
                if ($this->userlog->getUser()) {
        Severity: Minor
        Found in class/setting.php - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method logForm has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function logForm($options = null)
            {
                $form    = new XoopsThemeForm(_AM_USERLOG_LOGFORM, 'logs', 'logs.php', 'get');
                $headers = $this->getOptions('', 'title');
                unset($headers['active'], $headers['inside'], $headers['outside'], $headers['unset_pass'], $headers['store_db'], $headers['store_file'], $headers['views']);
        Severity: Minor
        Found in class/setting.php - About 1 hr to fix

          Method getSets has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $limit = 0,
                  $start = 0,
                  $otherCriteria = null,
                  $sort = 'set_id',
                  $order = 'DESC',
          Severity: Major
          Found in class/setting.php - About 1 hr to fix

            Function logForm has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                public function logForm($options = null)
                {
                    $form    = new XoopsThemeForm(_AM_USERLOG_LOGFORM, 'logs', 'logs.php', 'get');
                    $headers = $this->getOptions('', 'title');
                    unset($headers['active'], $headers['inside'], $headers['outside'], $headers['unset_pass'], $headers['store_db'], $headers['store_file'], $headers['views']);
            Severity: Minor
            Found in class/setting.php - About 55 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

            Avoid too many return statements within this method.
            Open

                    return false;
            Severity: Major
            Found in class/setting.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return false;
              Severity: Major
              Found in class/setting.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return false;
                Severity: Major
                Found in class/setting.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return $sets;
                  Severity: Major
                  Found in class/setting.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return $sets;
                    Severity: Major
                    Found in class/setting.php - About 30 mins to fix

                      The method getOptions() has an NPath complexity of 2688. The configured NPath complexity threshold is 200.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 getOptions() has 237 lines of code. Current threshold is set to 100. Avoid really long methods.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      The method getSet() has an NPath complexity of 6912. The configured NPath complexity threshold is 200.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 getOptions() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 method getSet() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 '$gid_unique_gid' which will lead to PHP notices.
                      Open

                                  $gid_unique_gid[$key] = 'gid' . $gid;
                      Severity: Minor
                      Found in class/setting.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 '$gid_unique_gid' which will lead to PHP notices.
                      Open

                                      in_array($sLogbyId, $gid_unique_gid)
                      Severity: Minor
                      Found in class/setting.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

                      The method setDb has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation.
                      Open

                          public function setDb($force = true)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      BooleanArgumentFlag

                      Since: 1.4.0

                      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                      Example

                      class Foo {
                          public function bar($flag = true) {
                          }
                      }

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

                      The method storeSet has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation.
                      Open

                          public function storeSet($force = true)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      BooleanArgumentFlag

                      Since: 1.4.0

                      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                      Example

                      class Foo {
                          public function bar($flag = true) {
                          }
                      }

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

                      The method getSets has a boolean flag argument $asObject, which is a certain sign of a Single Responsibility Principle violation.
                      Open

                              $asObject = true,
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      BooleanArgumentFlag

                      Since: 1.4.0

                      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                      Example

                      class Foo {
                          public function bar($flag = true) {
                          }
                      }

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

                      Missing class import via use statement (line '551', column '53').
                      Open

                                                  $el[$ele . $type] = new XoopsFormText(constant($defEl), "options[{$ele}{$type}]", 10, 255, !empty($options[$ele . $type]) ? $options[$ele . $type] : null);
                      Severity: Minor
                      Found in class/setting.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 getSets has a boolean flag argument $id_as_key, which is a certain sign of a Single Responsibility Principle violation.
                      Open

                              $id_as_key = true
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      BooleanArgumentFlag

                      Since: 1.4.0

                      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                      Example

                      class Foo {
                          public function bar($flag = true) {
                          }
                      }

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

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

                              $form    = new XoopsThemeForm(_AM_USERLOG_LOGFORM, 'logs', 'logs.php', 'get');
                      Severity: Minor
                      Found in class/setting.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 '540', column '37').
                      Open

                                          $el[$ele] = new XoopsFormRadio(constant($defEl), "options[{$ele}]", isset($options[$ele]) ? $options[$ele] : '');
                      Severity: Minor
                      Found in class/setting.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 '619', column '25').
                      Open

                              $criteria = new CriteriaCompo();
                      Severity: Minor
                      Found in class/setting.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

                      Avoid using static access to class 'XoopsCache' in method '_loadCacheFile'.
                      Open

                              return XoopsCache::read($key);
                      Severity: Minor
                      Found in class/setting.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 'Userlog' in method '__construct'.
                      Open

                              $this->userlog = Userlog::getInstance();
                      Severity: Minor
                      Found in class/setting.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 assigning values to variables in if clauses and the like (line '124', column '17').
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

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

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

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

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

                      Avoid using static access to class 'XoopsCache' in method '_deleteCacheFile'.
                      Open

                              return XoopsCache::delete($key);
                      Severity: Minor
                      Found in class/setting.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 assigning values to variables in if clauses and the like (line '117', column '13').
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

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

                      Avoid using static access to class 'XoopsUserUtility' in method 'getSet'.
                      Open

                              $unique_ip = XoopsUserUtility::getIP(); // ip as int
                      Severity: Minor
                      Found in class/setting.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 'XoopsCache' in method '_createCacheFile'.
                      Open

                              return XoopsCache::write($key, $data);
                      Severity: Minor
                      Found in class/setting.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 assigning values to variables in if clauses and the like (line '130', column '13').
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

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

                      Avoid using static access to class 'Userlog' in method '__construct'.
                      Open

                              $this->userlog = Userlog::getInstance();
                      Severity: Minor
                      Found in class/setting.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 getOptions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                      Open

                              } else {
                                  $uid        = 0;
                                  $uname      = '';
                                  $last_login = 0;
                                  $admin      = 0;
                      Severity: Minor
                      Found in class/setting.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 parameters such as '$root_path'.
                      Open

                          private function _createCacheFile($data, $name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      UnusedFormalParameter

                      Since: 0.2

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

                      Example

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

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

                      Avoid unused parameters such as '$force'.
                      Open

                          public function storeSet($force = true)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      UnusedFormalParameter

                      Since: 0.2

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

                      Example

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

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

                      Avoid unused parameters such as '$root_path'.
                      Open

                          private function _loadCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      UnusedFormalParameter

                      Since: 0.2

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

                      Example

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

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

                      Avoid unused parameters such as '$root_path'.
                      Open

                          private function _deleteCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      UnusedFormalParameter

                      Since: 0.2

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

                      Example

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

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

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

                              foreach ($headers as $ele => $def) {
                      Severity: Minor
                      Found in class/setting.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

                      Each class must be in a namespace of at least one level (a top-level vendor name)
                      Open

                      class UserlogSetting extends XoopsObject
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Each class must be in a namespace of at least one level (a top-level vendor name)
                      Open

                      class UserlogSettingHandler extends XoopsPersistableObjectHandler
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      The parameter $unique_id is not named in camelCase.
                      Open

                          public function setFile($logby = 'uid', $unique_id, $options)
                          {
                              return $this->_createCacheFile($options, "setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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

                      The parameter $unique_id is not named in camelCase.
                      Open

                          public function getFile($logby = 'uid', $unique_id)
                          {
                              return $this->_loadCacheFile("setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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

                      The parameter $unique_id is not named in camelCase.
                      Open

                          public function deleteFile($logby = 'uid', $unique_id)
                          {
                              return $this->_deleteCacheFile("setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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

                      The parameter $root_path is not named in camelCase.
                      Open

                          private function _deleteCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              if (empty($name)) {
                                  return false;
                              }
                      Severity: Minor
                      Found in class/setting.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

                      The property $all_logby is not named in camelCase.
                      Open

                      class UserlogSetting extends XoopsObject
                      {
                          /**
                           * @var string
                           */
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      CamelCasePropertyName

                      Since: 0.2

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

                      Example

                      class ClassName {
                          protected $property_name;
                      }

                      Source

                      The parameter $root_path is not named in camelCase.
                      Open

                          private function _createCacheFile($data, $name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              $name = $name ?: (string)time();
                              $key  = USERLOG_DIRNAME . "_{$name}";
                      
                      
                      Severity: Minor
                      Found in class/setting.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

                      The parameter $root_path is not named in camelCase.
                      Open

                          private function _loadCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              if (empty($name)) {
                                  return false;
                              }
                      Severity: Minor
                      Found in class/setting.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 31 and the first side effect is on line 22.
                      Open

                      <?php
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      The parameter $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $el. Configured minimum length is 3.
                      Open

                              $el          = [];
                      Severity: Minor
                      Found in class/setting.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

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

                          public function __construct(XoopsDatabase $db)
                      Severity: Minor
                      Found in class/setting.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 $id_as_key is not named in camelCase.
                      Open

                          public function getSets(
                              $limit = 0,
                              $start = 0,
                              $otherCriteria = null,
                              $sort = 'set_id',
                      Severity: Minor
                      Found in class/setting.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 $V. Configured minimum length is 3.
                      Open

                          public function getOptions($option = null, $V = 'value')
                      Severity: Minor
                      Found in class/setting.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

                      Each class must be in a file by itself
                      Open

                      class UserlogSettingHandler extends XoopsPersistableObjectHandler
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Method name "UserlogSetting::unique_id" is not in camel caps format
                      Open

                          public function unique_id()
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Method name "_deleteCacheFile" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _deleteCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Method name "_createCacheFile" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _createCacheFile($data, $name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Method name "_loadCacheFile" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _loadCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 137 characters
                      Open

                                              $defEl = '_AM_USERLOG_' . strtoupper($ele . $type); // if constant is defined in translation - it is good for now
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 137 characters
                      Open

                                                  $el[$ele . $type]->setDescription(sprintf(constant($defEl . '_FORM'), constant($defEle), constant($defEle)));
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Arguments with default values must be at the end of the argument list
                      Open

                          public function setFile($logby = 'uid', $unique_id, $options)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Arguments with default values must be at the end of the argument list
                      Open

                          public function deleteFile($logby = 'uid', $unique_id)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 164 characters
                      Open

                              unset($headers['active'], $headers['inside'], $headers['outside'], $headers['unset_pass'], $headers['store_db'], $headers['store_file'], $headers['views']);
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 133 characters
                      Open

                                          $el[$ele] = new XoopsFormRadio(constant($defEl), "options[{$ele}]", isset($options[$ele]) ? $options[$ele] : '');
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 128 characters
                      Open

                                          $defEl    = '_AM_USERLOG_' . strtoupper($ele); // if constant is defined in translation - it is good for now
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Arguments with default values must be at the end of the argument list
                      Open

                          public function getFile($logby = 'uid', $unique_id)
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 183 characters
                      Open

                                                  $el[$ele . $type] = new XoopsFormText(constant($defEl), "options[{$ele}{$type}]", 10, 255, !empty($options[$ele . $type]) ? $options[$ele . $type] : null);
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      Line exceeds 120 characters; contains 136 characters
                      Open

                                  $ret['post']['value'] = $this->userlog->patchLoginHistory($ret['post']['value'], $uid, !empty($ret['unset_pass']['value']));
                      Severity: Minor
                      Found in class/setting.php by phpcodesniffer

                      The variable $unique_uid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $ip_unique_ip is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $sUnique_id is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_gid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $uid_unique_uid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_gid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_id is not named in camelCase.
                      Open

                          public function getFile($logby = 'uid', $unique_id)
                          {
                              return $this->_loadCacheFile("setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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 $unique_ip is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $sUnique_id is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $gid_unique_gid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_uid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_uid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $ip_unique_ip is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $gid_unique_gid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $uid_unique_uid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $sUnique_id is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_id is not named in camelCase.
                      Open

                          public function setFile($logby = 'uid', $unique_id, $options)
                          {
                              return $this->_createCacheFile($options, "setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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 $unique_id is not named in camelCase.
                      Open

                          public function deleteFile($logby = 'uid', $unique_id)
                          {
                              return $this->_deleteCacheFile("setting_{$logby}_{$unique_id}");
                          }
                      Severity: Minor
                      Found in class/setting.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 $unique_gid is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_ip is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $unique_ip is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $sUnique_id is not named in camelCase.
                      Open

                          public function getSet()
                          {
                              $options = '';
                              // if uid setting exist in File
                              $unique_uid = $this->userlog->getUser() ? $this->userlog->getUser()->getVar('uid') : 0;
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $last_login is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $id_as_key is not named in camelCase.
                      Open

                          public function getSets(
                              $limit = 0,
                              $start = 0,
                              $otherCriteria = null,
                              $sort = 'set_id',
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $query_types is not named in camelCase.
                      Open

                          public function logForm($options = null)
                          {
                              $form    = new XoopsThemeForm(_AM_USERLOG_LOGFORM, 'logs', 'logs.php', 'get');
                              $headers = $this->getOptions('', 'title');
                              unset($headers['active'], $headers['inside'], $headers['outside'], $headers['unset_pass'], $headers['store_db'], $headers['store_file'], $headers['views']);
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $last_login is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $last_login is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $V is not named in camelCase.
                      Open

                          public function getOptions($option = null, $V = 'value')
                          {
                              $V = strtolower($V);
                      
                              if ($this->userlog->getUser()) {
                      Severity: Minor
                      Found in class/setting.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 $query_types is not named in camelCase.
                      Open

                          public function logForm($options = null)
                          {
                              $form    = new XoopsThemeForm(_AM_USERLOG_LOGFORM, 'logs', 'logs.php', 'get');
                              $headers = $this->getOptions('', 'title');
                              unset($headers['active'], $headers['inside'], $headers['outside'], $headers['unset_pass'], $headers['store_db'], $headers['store_file'], $headers['views']);
                      Severity: Minor
                      Found in class/setting.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 method unique_id is not named in camelCase.
                      Open

                          public function unique_id()
                          {
                              if ('ip' === $this->getVar('logby')) {
                                  return long2ip($this->getVar('unique_id'));
                              }
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

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

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method _deleteCacheFile is not named in camelCase.
                      Open

                          private function _deleteCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              if (empty($name)) {
                                  return false;
                              }
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

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

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method _createCacheFile is not named in camelCase.
                      Open

                          private function _createCacheFile($data, $name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              $name = $name ?: (string)time();
                              $key  = USERLOG_DIRNAME . "_{$name}";
                      
                      
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

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

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method _loadCacheFile is not named in camelCase.
                      Open

                          private function _loadCacheFile($name = null, $root_path = XOOPS_CACHE_PATH)
                          {
                              if (empty($name)) {
                                  return false;
                              }
                      Severity: Minor
                      Found in class/setting.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

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

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      There are no issues that match your filters.

                      Category
                      Status