1 | <?php |
||
6 | class ArgumentParser |
||
7 | { |
||
8 | private $description; |
||
9 | private $footer; |
||
10 | private $options = []; |
||
11 | |||
12 | public function setDescription($description) |
||
16 | |||
17 | public function setFooter($footer) |
||
21 | |||
22 | /** |
||
23 | * @param $key |
||
24 | * @param $value |
||
25 | * @throws OptionExistsException |
||
26 | */ |
||
27 | 3 | private function addToOptionArray($key, $value) |
|
35 | |||
36 | /** |
||
37 | * Add an option to be parsed. |
||
38 | * Arguments are presented as a structured array with the following possible keys. |
||
39 | * |
||
40 | * name: The name of the option prefixed with a double dash -- |
||
41 | * short_name: A shorter single character option prefixed with a single dash - |
||
42 | * type: Required for all options that take values. An option specified without a type is considered to be a |
||
43 | * boolean flag. |
||
44 | * help: A help message for the option |
||
45 | * |
||
46 | * @param $option |
||
47 | * @throws OptionExistsException |
||
48 | * @throws InvalidArgumentDescriptionException |
||
49 | */ |
||
50 | 4 | public function addOption($option) |
|
58 | |||
59 | /** |
||
60 | * Parse a long argument that is prefixed with a double dash "--" |
||
61 | * |
||
62 | * @param $arguments |
||
63 | * @param $argPointer |
||
64 | * @return array |
||
65 | * @throws InvalidValueException |
||
66 | */ |
||
67 | 1 | private function parseLongArgument($arguments, &$argPointer) |
|
89 | |||
90 | /** |
||
91 | * Parses command line arguments and return a structured array of options and their associated values. |
||
92 | * |
||
93 | * @param array $arguments An optional array of arguments that would be parsed instead of those passed to the CLI. |
||
94 | * @return array |
||
95 | * @throws InvalidValueException |
||
96 | */ |
||
97 | 1 | public function parse($arguments = null) |
|
117 | |||
118 | public function getHelp() |
||
122 | } |
||
123 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.