1 | <?php |
||
5 | class Options //implements \ArrayAccess, \Iterator |
||
6 | { |
||
7 | private $options = []; |
||
8 | private $index = 0; |
||
|
|||
9 | |||
10 | /** |
||
11 | * A map of all the options the parser recognises. |
||
12 | * The map is actually an array which associates short or long options with |
||
13 | * their appropriate parameters. Options which have both long and short |
||
14 | * versions would be repeated. This structure is used to quickly find the |
||
15 | * paramters of an option whether in the short form or long form. This |
||
16 | * parameter is automatically populated by the library as options are added. |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | private $map; |
||
21 | |||
22 | 27 | public function add($options) |
|
40 | |||
41 | 27 | private function fillOption($option) |
|
49 | |||
50 | 24 | public function getMap() |
|
54 | |||
55 | 4 | private function stringOptionToArray($option) |
|
65 | |||
66 | 8 | public function getArray() |
|
70 | |||
71 | } |
||
72 | |||
73 |
This check marks private properties in classes that are never used. Those properties can be removed.