Total Complexity | 11 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | abstract class CommandLineHandler |
||
13 | { |
||
14 | public static $_args; |
||
15 | abstract public static function handle(); |
||
16 | |||
17 | protected static function setArgs($path = null) |
||
21 | } |
||
22 | } |
||
23 | |||
24 | protected static function peekArgs() |
||
25 | { |
||
26 | if (!isset(static::$_args)) { |
||
27 | static::setArgs(); |
||
28 | } |
||
29 | return count(static::$_args) ? static::$_args[0] : false; |
||
30 | } |
||
31 | |||
32 | protected static function shiftArgs() |
||
33 | { |
||
34 | if (!isset(static::$_args)) { |
||
35 | static::setArgs(); |
||
36 | } |
||
37 | return array_shift(static::$_args); |
||
38 | } |
||
39 | |||
40 | protected static function getArgs() |
||
46 | } |
||
47 | |||
48 | protected static function unshiftArgs($string) |
||
56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.