Conditions | 6 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | protected function parse(&$input, $offset, Context $context) |
||
37 | { |
||
38 | $this->pushCaseSensitivityToContext($context); |
||
39 | $pattern = $this->pattern . ($context->isCaseSensitive() ? '' : 'i'); |
||
40 | $this->popCaseSensitivityFromContext($context); |
||
41 | |||
42 | if (preg_match($pattern, $input, $match, 0, $offset) !== false) { |
||
43 | if (count($match) > 0 && mb_strlen($match[0]) > 0 && strpos($input, $match[0], $offset) == $offset) { |
||
44 | return $this->success($input, $offset, mb_strlen($match[0])); |
||
45 | } |
||
46 | } |
||
47 | |||
48 | return $this->failure($input, $offset); |
||
49 | } |
||
57 |