Conditions | 5 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function skipSpacing($in, $offset) |
||
33 | { |
||
34 | $spacer = end($this->spacers); |
||
35 | |||
36 | // If `true`; use top-most Parser instance in stack. |
||
37 | if ($spacer === true) { |
||
38 | do { |
||
39 | $spacer = prev($this->spacers); |
||
40 | } while ($spacer !== false && !($spacer instanceof Parser)); |
||
41 | } |
||
42 | |||
43 | if ($spacer instanceof Parser) { |
||
44 | $match = $spacer->match($in, $offset); |
||
45 | return $match->match ? $match->length : false; |
||
46 | } |
||
47 | |||
48 | return 0; |
||
49 | } |
||
50 | } |