mambax7/extgallery

View on GitHub
class/pear/Console/Getopt.php

Summary

Maintainability
D
3 days
Test Coverage

readPHPArgv accesses the super-global variable $GLOBALS.
Open

    public static function readPHPArgv()
    {
        global $argv;
        if (!is_array($argv)) {
            if (!@is_array($_SERVER['argv'])) {
Severity: Minor
Found in class/pear/Console/Getopt.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

readPHPArgv accesses the super-global variable $_SERVER.
Open

    public static function readPHPArgv()
    {
        global $argv;
        if (!is_array($argv)) {
            if (!@is_array($_SERVER['argv'])) {
Severity: Minor
Found in class/pear/Console/Getopt.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

readPHPArgv accesses the super-global variable $_SERVER.
Open

    public static function readPHPArgv()
    {
        global $argv;
        if (!is_array($argv)) {
            if (!@is_array($_SERVER['argv'])) {
Severity: Minor
Found in class/pear/Console/Getopt.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

readPHPArgv accesses the super-global variable $GLOBALS.
Open

    public static function readPHPArgv()
    {
        global $argv;
        if (!is_array($argv)) {
            if (!@is_array($_SERVER['argv'])) {
Severity: Minor
Found in class/pear/Console/Getopt.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

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

    protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
    {
        for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
            $opt     = $arg[$i];
            $opt_arg = null;
Severity: Minor
Found in class/pear/Console/Getopt.php - About 4 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function _parseLongOption has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
    {
        @list($opt, $opt_arg) = explode('=', $arg, 2);

        $opt_len = strlen($opt);
Severity: Minor
Found in class/pear/Console/Getopt.php - About 4 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function doGetopt has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
    {
        // in case you pass directly readPHPArgv() as the first arg
        if (PEAR::isError($args)) {
            return $args;
Severity: Minor
Found in class/pear/Console/Getopt.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

class Console_Getopt
{
    /**
     * Parses the command-line options.
     *
Severity: Minor
Found in class/pear/Console/Getopt.php by phpmd

Method doGetopt has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
    {
        // in case you pass directly readPHPArgv() as the first arg
        if (PEAR::isError($args)) {
            return $args;
Severity: Major
Found in class/pear/Console/Getopt.php - About 2 hrs to fix

    Method _parseLongOption has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
        {
            @list($opt, $opt_arg) = explode('=', $arg, 2);
    
            $opt_len = strlen($opt);
    Severity: Minor
    Found in class/pear/Console/Getopt.php - About 1 hr to fix

      Method _parseShortOption has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
          {
              for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                  $opt     = $arg[$i];
                  $opt_arg = null;
      Severity: Minor
      Found in class/pear/Console/Getopt.php - About 1 hr to fix

        Method _parseShortOption has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
        Severity: Minor
        Found in class/pear/Console/Getopt.php - About 45 mins to fix

          Method _parseLongOption has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
          Severity: Minor
          Found in class/pear/Console/Getopt.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if (!isset($args[++$argIdx])) {
                                        $msg = "Console_Getopt: option requires an argument --$opt";
                                        return PEAR::raiseError($msg);
                                    }
            Severity: Major
            Found in class/pear/Console/Getopt.php - About 45 mins to fix

              Consider simplifying this complex logical expression.
              Open

                          if ('' != $opt_rest && '=' != $opt[0]
                              && $i + 1 < count($long_options)
                              && $opt == substr($long_options[$i + 1], 0, $opt_len)
                              && '' != $next_option_rest
                              && '=' != $next_option_rest[0]) {
              Severity: Major
              Found in class/pear/Console/Getopt.php - About 40 mins to fix

                Method doGetopt has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                Severity: Minor
                Found in class/pear/Console/Getopt.php - About 35 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return;
                  Severity: Major
                  Found in class/pear/Console/Getopt.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
                    Severity: Major
                    Found in class/pear/Console/Getopt.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return [$opts, $non_opts];
                      Severity: Major
                      Found in class/pear/Console/Getopt.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return;
                        Severity: Major
                        Found in class/pear/Console/Getopt.php - About 30 mins to fix

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

                              public static function readPHPArgv()
                              {
                                  global $argv;
                                  if (!is_array($argv)) {
                                      if (!@is_array($_SERVER['argv'])) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.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 doGetopt() has an NPath complexity of 672. The configured NPath complexity threshold is 200.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          NPathComplexity

                          Since: 0.1

                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                          Example

                          class Foo {
                              function bar() {
                                  // lots of complicated code
                              }
                          }

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

                          The method _parseLongOption() has an NPath complexity of 674. The configured NPath complexity threshold is 200.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          NPathComplexity

                          Since: 0.1

                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                          Example

                          class Foo {
                              function bar() {
                                  // lots of complicated code
                              }
                          }

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

                          The method doGetopt() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CyclomaticComplexity

                          Since: 0.1

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

                          Example

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

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

                          The method _parseShortOption() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CyclomaticComplexity

                          Since: 0.1

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

                          Example

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

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

                          The method _parseLongOption() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CyclomaticComplexity

                          Since: 0.1

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

                          Example

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

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

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

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          BooleanArgumentFlag

                          Since: 1.4.0

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

                          Example

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

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

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

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          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

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

                              public static function readPHPArgv()
                              {
                                  global $argv;
                                  if (!is_array($argv)) {
                                      if (!@is_array($_SERVER['argv'])) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          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

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

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          BooleanArgumentFlag

                          Since: 1.4.0

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

                          Example

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

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

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

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          BooleanArgumentFlag

                          Since: 1.4.0

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

                          Example

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

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

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

                              public static function readPHPArgv()
                              {
                                  global $argv;
                                  if (!is_array($argv)) {
                                      if (!@is_array($_SERVER['argv'])) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          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

                          Avoid using static access to class 'PEAR' in method 'doGetopt'.
                          Open

                                  if (PEAR::isError($args)) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method 'readPHPArgv'.
                          Open

                                              return PEAR::raiseError('Console_Getopt: ' . $msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

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

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          IfStatementAssignment

                          Since: 2.7.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method 'doGetopt'.
                          Open

                                          if (PEAR::isError($error)) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

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

                                              } else {
                                                  $msg = "option requires an argument --$opt";
                                                  return PEAR::raiseError('Console_Getopt: ' . $msg);
                                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          ElseExpression

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseLongOption'.
                          Open

                                  return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseShortOption'.
                          Open

                                                      return PEAR::raiseError('Console_Getopt: ' . $msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

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

                                      } else {
                                          $next_option_rest = '';
                                      }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          ElseExpression

                          Since: 1.4.0

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

                          Example

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

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

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

                                      } else {
                                          $error = self::_parseShortOption(
                                              substr($arg, 1),
                                              $short_options,
                                              $opts,
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          ElseExpression

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseLongOption'.
                          Open

                                                      return PEAR::raiseError($msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

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

                                          } else {
                                              /* Option requires an argument. Use the remainder of the arg
                                                 string if there is anything left. */
                                              if ($i + 1 < strlen($arg)) {
                                                  $opts[] = [$opt, substr($arg, $i + 1)];
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          ElseExpression

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseLongOption'.
                          Open

                                          return PEAR::raiseError($msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseShortOption'.
                          Open

                                          return PEAR::raiseError($msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseShortOption'.
                          Open

                                                  return PEAR::raiseError('Console_Getopt: ' . $msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseLongOption'.
                          Open

                                                  return PEAR::raiseError($msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method 'doGetopt'.
                          Open

                                          if (PEAR::isError($error)) {
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

                          Avoid using static access to class 'PEAR' in method '_parseLongOption'.
                          Open

                                          return PEAR::raiseError($msg);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          StaticAccess

                          Since: 1.4.0

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

                          Example

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

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

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

                                      $opt_start = substr($long_opt, 0, $opt_len);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          UnusedLocalVariable

                          Since: 0.2

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

                          Example

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

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

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

                          class Console_Getopt

                          The parameter $skip_unknown is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $long_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $short_options is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $skip_unknown is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $short_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $long_options is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $skip_unknown is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $short_options is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $skip_unknown is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $short_options is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $skip_unknown is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The parameter $long_options is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseParameterName

                          Since: 0.2

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

                          Example

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

                          Source

                          The class Console_Getopt is not named in CamelCase.
                          Open

                          class Console_Getopt
                          {
                              /**
                               * Parses the command-line options.
                               *
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseClassName

                          Since: 0.2

                          It is considered best practice to use the CamelCase notation to name classes.

                          Example

                          class class_name {
                          }

                          Source

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

                          <?php

                          Each PHP statement must be on a line by itself
                          Open

                                                  $opt_arg = $args[$argIdx];/* Else use the next argument. */;

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

                              protected static function _isLongOpt($arg)

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

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)

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

                              protected static function _isShortOpt($arg)

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

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)

                          Class name "Console_Getopt" is not in camel caps format
                          Open

                          class Console_Getopt

                          The variable $opt_len is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt_name is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $next_option_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_len is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $next_option_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $short_options is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $short_options is not named in camelCase.
                          Open

                              public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $next_option_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $short_options is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt_name is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_len is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $next_option_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_start is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_opt is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $skip_unknown is not named in camelCase.
                          Open

                              public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  return self::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $short_options is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_rest is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $non_opts is not named in camelCase.
                          Open

                              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
                              {
                                  // in case you pass directly readPHPArgv() as the first arg
                                  if (PEAR::isError($args)) {
                                      return $args;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_len is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_len is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $long_options is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The variable $opt_arg is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseVariableName

                          Since: 0.2

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

                          Example

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

                          Source

                          The method _isLongOpt is not named in camelCase.
                          Open

                              protected static function _isLongOpt($arg)
                              {
                                  return strlen($arg) > 2 && '-' == $arg[0] && '-' == $arg[1]
                                         && preg_match('/[a-zA-Z]+$/', substr($arg, 2));
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseMethodName

                          Since: 0.2

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

                          Example

                          class ClassName {
                              public function get_name() {
                              }
                          }

                          Source

                          The method _parseShortOption is not named in camelCase.
                          Open

                              protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                                      $opt     = $arg[$i];
                                      $opt_arg = null;
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseMethodName

                          Since: 0.2

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

                          Example

                          class ClassName {
                              public function get_name() {
                              }
                          }

                          Source

                          The method _parseLongOption is not named in camelCase.
                          Open

                              protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                              {
                                  @list($opt, $opt_arg) = explode('=', $arg, 2);
                          
                                  $opt_len = strlen($opt);
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseMethodName

                          Since: 0.2

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

                          Example

                          class ClassName {
                              public function get_name() {
                              }
                          }

                          Source

                          The method _isShortOpt is not named in camelCase.
                          Open

                              protected static function _isShortOpt($arg)
                              {
                                  return 2 == strlen($arg) && '-' == $arg[0]
                                         && preg_match('/[a-zA-Z]/', $arg[1]);
                              }
                          Severity: Minor
                          Found in class/pear/Console/Getopt.php by phpmd

                          CamelCaseMethodName

                          Since: 0.2

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

                          Example

                          class ClassName {
                              public function get_name() {
                              }
                          }

                          Source

                          There are no issues that match your filters.

                          Category
                          Status