XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/includes/os/class.Android.inc.php

Summary

Maintainability
F
3 days
Test Coverage

Function _filesystems has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
Open

    private function _filesystems()
    {
        $notwas = true;
        if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
            $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
Severity: Minor
Found in phpsysinfo/includes/os/class.Android.inc.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

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

class Android extends Linux
{
    /**
     * holds the data from /system/build.prop file
     *

Method _filesystems has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function _filesystems()
    {
        $notwas = true;
        if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
            $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
Severity: Major
Found in phpsysinfo/includes/os/class.Android.inc.php - About 2 hrs to fix

    Function _kernel has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        private function _kernel()
        {
            if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {
                $result = $strBuf;
                if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {
    Severity: Minor
    Found in phpsysinfo/includes/os/class.Android.inc.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 _machine has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        private function _machine()
        {
            if ($lines = $this->_get_buildprop()) {
                $buf = "";
                if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {
    Severity: Minor
    Found in phpsysinfo/includes/os/class.Android.inc.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 _distro has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function _distro()
        {
            $buf = "";
            if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                    $buf = trim($ar_buf[1]);
    Severity: Minor
    Found in phpsysinfo/includes/os/class.Android.inc.php - About 45 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 deeply nested control flow statements.
    Open

                                if (PSI_SHOW_MOUNT_OPTION) {
                                    if (PSI_SHOW_MOUNT_CREDENTIALS) {
                                        $dev->setOptions($mount_parm[$df_buf[1]]['options']);
                                    } else {
                                        $mpo=$mount_parm[$df_buf[1]]['options'];
    Severity: Major
    Found in phpsysinfo/includes/os/class.Android.inc.php - About 45 mins to fix

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

          private function _pci()
          {
              if (CommonFunctions::executeProgram('lspci', '', $bufr, false)) {
                  $bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                  foreach ($bufe as $buf) {
      Severity: Minor
      Found in phpsysinfo/includes/os/class.Android.inc.php - About 35 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          public function build()
          {
              if (!$this->blockname || $this->blockname==='vitals') {
                  $this->_distro();
                  $this->_hostname();
      Severity: Minor
      Found in phpsysinfo/includes/os/class.Android.inc.php - About 25 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      The method build() has an NPath complexity of 243. The configured NPath complexity threshold is 200.
      Open

          public function build()
          {
              if (!$this->blockname || $this->blockname==='vitals') {
                  $this->_distro();
                  $this->_hostname();

      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 _filesystems() has an NPath complexity of 12057. The configured NPath complexity threshold is 200.
      Open

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          public function build()
          {
              if (!$this->blockname || $this->blockname==='vitals') {
                  $this->_distro();
                  $this->_hostname();

      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 '$strBuf' which will lead to PHP notices.
      Open

                      $result .= ' '.$strBuf;

      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 '$strBuf' which will lead to PHP notices.
      Open

              if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {

      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 '$strBuf' which will lead to PHP notices.
      Open

              } elseif (CommonFunctions::rfts('/proc/version', $strBuf, 1) && preg_match('/version\s+(\S+)/', $strBuf, $ar_buf)) {

      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 '$strBuf' which will lead to PHP notices.
      Open

                  if (CommonFunctions::executeProgram('uname', '-m', $strBuf, PSI_DEBUG)) {

      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 '$strBuf' which will lead to PHP notices.
      Open

                  if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {

      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 '$mount_parm' which will lead to PHP notices.
      Open

                              $mount_parm[$mount_buf[1]]['fstype'] = $mount_buf[2];

      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 '$strBuf' which will lead to PHP notices.
      Open

                      if (preg_match('/SMP/', $strBuf)) {

      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 '$mount_parm' which will lead to PHP notices.
      Open

                                  $dev->setFsType($mount_parm[$df_buf[1]]['fstype']);

      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 '$strBuf' which will lead to PHP notices.
      Open

                  $result = $strBuf;

      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 '$mount_parm' which will lead to PHP notices.
      Open

                                          $mpo=$mount_parm[$df_buf[1]]['options'];

      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 '$strBuf' which will lead to PHP notices.
      Open

              } elseif (CommonFunctions::rfts('/proc/version', $strBuf, 1) && preg_match('/version\s+(\S+)/', $strBuf, $ar_buf)) {

      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 '$strBuf' which will lead to PHP notices.
      Open

                  if (preg_match('/SMP/', $strBuf)) {

      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 '$mount_parm' which will lead to PHP notices.
      Open

                                  $dev->setName($mount_parm[$df_buf[1]]['mountdev']);

      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 '$mount_parm' which will lead to PHP notices.
      Open

                                          $dev->setOptions($mount_parm[$df_buf[1]]['options']);

      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 '$bufr' which will lead to PHP notices.
      Open

                  $bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);

      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 '$mount_parm' which will lead to PHP notices.
      Open

                              $mount_parm[$mount_buf[1]]['mountdev'] = $mount_buf[0];

      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 '$bufr' which will lead to PHP notices.
      Open

              if (CommonFunctions::executeProgram('lspci', '', $bufr, false)) {

      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 '$mount_parm' which will lead to PHP notices.
      Open

                              if (PSI_SHOW_MOUNT_OPTION) $mount_parm[$mount_buf[1]]['options'] = $mount_buf[3];

      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 '$mount_parm' which will lead to PHP notices.
      Open

                              if (isset($mount_parm[$df_buf[1]])) {

      UndefinedVariable

      Since: 2.8.0

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

      Example

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

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

      Missing class import via use statement (line '113', column '36').
      Open

                              $dev = new DiskDevice();

      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

      Remove error control operator '@' on line 186.
      Open

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

      ErrorControlOperator

      Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

      Example

      function foo($filePath) {
          $file = @fopen($filPath); // hides exceptions
          $key = @$array[$notExistingKey]; // assigns null to $key
      }

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

      Missing class import via use statement (line '231', column '32').
      Open

                          $dev = new HWDevice();

      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 'CommonFunctions' in method '_kernel'.
      Open

                  if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {

      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 'CommonFunctions' in method '_kernel'.
      Open

              if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {

      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 '186', column '21').
      Open

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

      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 'CommonFunctions' in method '_get_buildprop'.
      Open

                     CommonFunctions::rfts('/system//build.prop', $this->_buildprop, 0, 4096, false); //fix some access issues

      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 'CommonFunctions' in method '_kernel'.
      Open

              } elseif (CommonFunctions::rfts('/proc/version', $strBuf, 1) && preg_match('/version\s+(\S+)/', $strBuf, $ar_buf)) {

      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 'Parser' in method '_filesystems'.
      Open

                  $arrResult = Parser::df("-P 2>/dev/null", false);

      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 'CommonFunctions' in method '_get_buildprop'.
      Open

                 if (!CommonFunctions::rfts('/system/build.prop', $this->_buildprop, 0, 4096, false)) {

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

                                      } else {
                                          $mpo=$mount_parm[$df_buf[1]]['options'];
      
                                          $mpo=preg_replace('/(^guest,)|(^guest$)|(,guest$)/i', '', $mpo);
                                          $mpo=preg_replace('/,guest,/i', ',', $mpo);

      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 assigning values to variables in if clauses and the like (line '202', column '13').
      Open

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

      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 'CommonFunctions' in method '_kernel'.
      Open

                  if (CommonFunctions::executeProgram('uname', '-m', $strBuf, PSI_DEBUG)) {

      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 '179', column '14').
      Open

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

      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

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

              } else {
                  if (preg_match('/^(\d+\.\d+)/', $buf, $ver)
                      && ($list = @parse_ini_file(PSI_APP_ROOT."/data/osnames.ini", true))
                      && isset($list['Android'][$ver[1]])) {
                          $buf.=' '.$list['Android'][$ver[1]];

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'CommonFunctions' in method '_filesystems'.
      Open

              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {

      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 'CommonFunctions' in method '_pci'.
      Open

              if (CommonFunctions::executeProgram('lspci', '', $bufr, false)) {

      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 'CommonFunctions' in method '_filesystems'.
      Open

                  if (CommonFunctions::executeProgram('mount', '', $mount, PSI_DEBUG)) {

      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

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                              if ($df_buf[5] == 'K') $dev->setTotal($df_buf[4] * 1024);
                              elseif ($df_buf[5] == 'M') $dev->setTotal($df_buf[4] * 1024*1024);
                              elseif ($df_buf[5] == 'G') $dev->setTotal($df_buf[4] * 1024*1024*1024);
                              elseif ($df_buf[5] == 'T') $dev->setTotal($df_buf[4] * 1024*1024*1024*1024);
      Severity: Major
      Found in phpsysinfo/includes/os/class.Android.inc.php and 2 other locations - About 2 hrs to fix
      phpsysinfo/includes/os/class.Android.inc.php on lines 121..124
      phpsysinfo/includes/os/class.Android.inc.php on lines 126..129

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 141.

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

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

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

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

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                              if ($df_buf[8] == 'K') $dev->setUsed($df_buf[7] * 1024);
                              elseif ($df_buf[8] == 'M') $dev->setUsed($df_buf[7] * 1024*1024);
                              elseif ($df_buf[8] == 'G') $dev->setUsed($df_buf[7] * 1024*1024*1024);
                              elseif ($df_buf[8] == 'T') $dev->setUsed($df_buf[7] * 1024*1024*1024*1024);
      Severity: Major
      Found in phpsysinfo/includes/os/class.Android.inc.php and 2 other locations - About 2 hrs to fix
      phpsysinfo/includes/os/class.Android.inc.php on lines 116..119
      phpsysinfo/includes/os/class.Android.inc.php on lines 126..129

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 141.

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

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

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

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

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                              if ($df_buf[11] == 'K') $dev->setFree($df_buf[10] * 1024);
                              elseif ($df_buf[11] == 'M') $dev->setFree($df_buf[10] * 1024*1024);
                              elseif ($df_buf[11] == 'G') $dev->setFree($df_buf[10] * 1024*1024*1024);
                              elseif ($df_buf[11] == 'T') $dev->setFree($df_buf[10] * 1024*1024*1024*1024);
      Severity: Major
      Found in phpsysinfo/includes/os/class.Android.inc.php and 2 other locations - About 2 hrs to fix
      phpsysinfo/includes/os/class.Android.inc.php on lines 116..119
      phpsysinfo/includes/os/class.Android.inc.php on lines 121..124

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 141.

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

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

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

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

      Refactorings

      Further Reading

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

      class Android extends Linux

      The property $_buildprop is not named in camelCase.
      Open

      class Android extends Linux
      {
          /**
           * holds the data from /system/build.prop file
           *

      CamelCasePropertyName

      Since: 0.2

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

      Example

      class ClassName {
          protected $property_name;
      }

      Source

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

          protected function _distro()

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

          protected function _users()

      Property name "$_buildprop" should not be prefixed with an underscore to indicate visibility
      Open

          private $_buildprop = null;

      Method name "Android::_get_buildprop" is not in camel caps format
      Open

          private function _get_buildprop()

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

          private function _kernel()

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

          private function _machine()

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

          private function _filesystems()

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

          private function _get_buildprop()

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

          private function _pci()

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[5] == 'M') $dev->setTotal($df_buf[4] * 1024*1024);

      Line exceeds 120 characters; contains 129 characters
      Open

              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {

      Line exceeds 120 characters; contains 124 characters
      Open

              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {

      Inline control structures are not allowed
      Open

                              if ($df_buf[8] == 'K') $dev->setUsed($df_buf[7] * 1024);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[5] == 'G') $dev->setTotal($df_buf[4] * 1024*1024*1024);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[11] == 'G') $dev->setFree($df_buf[10] * 1024*1024*1024);

      Line exceeds 120 characters; contains 127 characters
      Open

                                          $mpo=preg_replace('/(^username=[^,]*,)|(^username=[^,]*$)|(,username=[^,]*$)/i', '', $mpo);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[8] == 'M') $dev->setUsed($df_buf[7] * 1024*1024);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[11] == 'T') $dev->setFree($df_buf[10] * 1024*1024*1024*1024);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[8] == 'G') $dev->setUsed($df_buf[7] * 1024*1024*1024);

      Inline control structures are not allowed
      Open

                              if ($df_buf[11] == 'K') $dev->setFree($df_buf[10] * 1024);

      Line exceeds 120 characters; contains 132 characters
      Open

       * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

      Inline control structures are not allowed
      Open

                              if (PSI_SHOW_MOUNT_OPTION) $mount_parm[$mount_buf[1]]['options'] = $mount_buf[3];

      Line exceeds 120 characters; contains 144 characters
      Open

                          if ((preg_match("/^(\/\S+)(\s+)(([0-9\.]+)([KMGT])(\s+)([0-9\.]+)([KMGT])(\s+)([0-9\.]+)([KMGT])(\s+))/", $df_line, $df_buf)

      Inline control structures are not allowed
      Open

                              if (PSI_SHOW_MOUNT_POINT) $dev->setMountPoint($df_buf[1]);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[5] == 'T') $dev->setTotal($df_buf[4] * 1024*1024*1024*1024);

      Line exceeds 120 characters; contains 124 characters
      Open

                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

      Line exceeds 120 characters; contains 132 characters
      Open

       * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

      Line exceeds 120 characters; contains 124 characters
      Open

              } elseif (CommonFunctions::rfts('/proc/version', $strBuf, 1) && preg_match('/version\s+(\S+)/', $strBuf, $ar_buf)) {

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[8] == 'T') $dev->setUsed($df_buf[7] * 1024*1024*1024*1024);

      Inline control structures are not allowed
      Open

                              if ($df_buf[5] == 'K') $dev->setTotal($df_buf[4] * 1024);

      Inline control structures are not allowed
      Open

                              elseif ($df_buf[11] == 'M') $dev->setFree($df_buf[10] * 1024*1024);

      Line exceeds 120 characters; contains 127 characters
      Open

                                          $mpo=preg_replace('/(^password=[^,]*,)|(^password=[^,]*$)|(,password=[^,]*$)/i', '', $mpo);

      Line exceeds 120 characters; contains 183 characters
      Open

                               || preg_match("/^(\/[^\s\:]+)\:(\s+)(([0-9\.]+)([KMGT])(\s+total\,\s+)([0-9\.]+)([KMGT])(\s+used\,\s+)([0-9\.]+)([KMGT])(\s+available))/", $df_line, $df_buf))

      Line indented incorrectly; expected 12 spaces, found 11
      Open

                 if (!CommonFunctions::rfts('/system/build.prop', $this->_buildprop, 0, 4096, false)) {

      Line indented incorrectly; expected 12 spaces, found 11
      Open

                 }

      Line indented incorrectly; expected at least 16 spaces, found 15
      Open

                     CommonFunctions::rfts('/system//build.prop', $this->_buildprop, 0, 4096, false); //fix some access issues

      The variable $df_line is not named in camelCase.
      Open

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _kernel()
          {
              if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {
                  $result = $strBuf;
                  if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _kernel()
          {
              if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {
                  $result = $strBuf;
                  if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

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

          private function _kernel()
          {
              if (CommonFunctions::executeProgram('uname', '-r', $strBuf, false)) {
                  $result = $strBuf;
                  if (CommonFunctions::executeProgram('uname', '-v', $strBuf, PSI_DEBUG)) {

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

          private function _get_buildprop()
          {
              if ($this->_buildprop === null) {
                 if (!CommonFunctions::rfts('/system/build.prop', $this->_buildprop, 0, 4096, false)) {
                     CommonFunctions::rfts('/system//build.prop', $this->_buildprop, 0, 4096, false); //fix some access issues

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

          private function _pci()
          {
              if (CommonFunctions::executeProgram('lspci', '', $bufr, false)) {
                  $bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                  foreach ($bufe as $buf) {

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

          private function _machine()
          {
              if ($lines = $this->_get_buildprop()) {
                  $buf = "";
                  if (preg_match('/^ro\.product\.manufacturer=([^\n]+)/m', $lines, $ar_buf) && (trim($ar_buf[1]) !== "unknown")) {

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

          protected function _distro()
          {
              $buf = "";
              if (($lines = $this->_get_buildprop()) && preg_match('/^ro\.build\.version\.release=([^\n]+)/m', $lines, $ar_buf)) {
                      $buf = trim($ar_buf[1]);

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

          protected function _users()
          {
              $this->sys->setUsers(1);
          }

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

          private function _filesystems()
          {
              $notwas = true;
              if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
                  $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

      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