Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | protected function parse(&$input, $offset, Context $context) |
||
44 | { |
||
45 | if ($this->parser === null) { |
||
46 | throw new \UnexpectedValueException('Missing parser'); |
||
47 | } |
||
48 | |||
49 | $match = $this->parser->parse($input, $offset, $context); |
||
50 | if ($match->match) { |
||
51 | return $this->success($input, $offset, $match->length, $match); |
||
52 | } |
||
53 | |||
54 | return $this->failure($input, $offset, $match->length); |
||
55 | } |
||
64 |