1 | <?php |
||
11 | class Parser implements \Iterator |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $position = 0; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $end = 0; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $execPtr = 0; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $data = ''; |
||
32 | |||
33 | /** |
||
34 | * @var Operation[] |
||
35 | */ |
||
36 | private $array = array(); |
||
37 | |||
38 | /** |
||
39 | * ScriptParser constructor. |
||
40 | * @param Math $math |
||
41 | * @param ScriptInterface $script |
||
42 | */ |
||
43 | 1125 | public function __construct(Math $math, ScriptInterface $script) |
|
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | public function getPosition() |
||
59 | |||
60 | /** |
||
61 | * @param string $packFormat |
||
62 | * @param integer $strSize |
||
63 | * @return array|bool |
||
64 | */ |
||
65 | 54 | private function unpackSize($packFormat, $strSize) |
|
76 | |||
77 | /** |
||
78 | * @param int $size |
||
79 | * @return bool |
||
80 | */ |
||
81 | 633 | private function validateSize($size) |
|
90 | |||
91 | /** |
||
92 | * @param int $ptr |
||
93 | * @return Operation |
||
94 | */ |
||
95 | 1041 | private function doNext($ptr) |
|
131 | |||
132 | /** |
||
133 | * |
||
134 | */ |
||
135 | 1083 | public function rewind() |
|
139 | |||
140 | /** |
||
141 | * @return Operation |
||
142 | */ |
||
143 | 1041 | public function current() |
|
153 | |||
154 | /** |
||
155 | * @return int |
||
156 | */ |
||
157 | public function key() |
||
161 | |||
162 | /** |
||
163 | * @return Operation |
||
164 | */ |
||
165 | 1065 | public function next() |
|
175 | |||
176 | /** |
||
177 | * @return bool |
||
178 | */ |
||
179 | 1083 | public function valid() |
|
183 | |||
184 | /** |
||
185 | * returns a mix of Buffer objects and strings |
||
186 | * |
||
187 | * @return Buffer[]|string[] |
||
188 | */ |
||
189 | 1011 | public function parse() |
|
210 | |||
211 | /** |
||
212 | * @return string |
||
213 | */ |
||
214 | 672 | public function getHumanReadable() |
|
229 | } |
||
230 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.