1 | <?php |
||
17 | class PrioritizeAnalyzer implements AnalyzerInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var int[] |
||
21 | */ |
||
22 | protected const PRIORITIES = [ |
||
23 | OpcodeInterface::RL_OPEN => -1, |
||
24 | OpcodeInterface::RL_DEFINE => -1, |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $priorities = []; |
||
31 | |||
32 | /** |
||
33 | * @param iterable|OpcodeInterface[] $opcodes |
||
34 | * @return iterable|OpcodeInterface[] |
||
35 | */ |
||
36 | public function analyze(iterable $opcodes): iterable |
||
48 | |||
49 | /** |
||
50 | * @param int $index |
||
51 | * @return \SplQueue |
||
52 | */ |
||
53 | private function priority(int $index): \SplQueue |
||
63 | } |
||
64 |