1 | <?php |
||
12 | class Parser implements \Iterator |
||
13 | { |
||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | private $position = 0; |
||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $end = 0; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $execPtr = 0; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $data = ''; |
||
33 | |||
34 | /** |
||
35 | * @var Operation[] |
||
36 | */ |
||
37 | private $array = array(); |
||
38 | |||
39 | /** |
||
40 | * ScriptParser constructor. |
||
41 | * @param Math $math |
||
42 | * @param ScriptInterface $script |
||
43 | */ |
||
44 | 1827 | public function __construct(Math $math, ScriptInterface $script) |
|
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | public function getPosition() |
||
60 | |||
61 | /** |
||
62 | * @param string $packFormat |
||
63 | * @param integer $strSize |
||
64 | * @return array|bool |
||
65 | */ |
||
66 | 54 | private function unpackSize($packFormat, $strSize) |
|
77 | |||
78 | /** |
||
79 | * @param int $size |
||
80 | * @return bool |
||
81 | */ |
||
82 | 651 | private function validateSize($size) |
|
87 | |||
88 | /** |
||
89 | * @param int $ptr |
||
90 | * @return Operation |
||
91 | */ |
||
92 | 1737 | private function doNext($ptr) |
|
126 | |||
127 | /** |
||
128 | * |
||
129 | */ |
||
130 | 1791 | public function rewind() |
|
134 | |||
135 | /** |
||
136 | * @return Operation |
||
137 | */ |
||
138 | 1737 | public function current() |
|
148 | |||
149 | /** |
||
150 | * @return int |
||
151 | */ |
||
152 | public function key() |
||
156 | |||
157 | /** |
||
158 | * @return Operation |
||
159 | */ |
||
160 | 1089 | public function next() |
|
170 | |||
171 | /** |
||
172 | * @return bool |
||
173 | */ |
||
174 | 1791 | public function valid() |
|
178 | |||
179 | /** |
||
180 | * returns a mix of Buffer objects and strings |
||
181 | * |
||
182 | * @return Buffer[]|string[] |
||
183 | */ |
||
184 | 1023 | public function parse() |
|
205 | |||
206 | /** |
||
207 | * @return string |
||
208 | */ |
||
209 | 672 | public function getHumanReadable() |
|
224 | } |
||
225 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.