| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 128 | protected function parse(&$input, $offset, Context $context) |
|
| 32 | { |
||
| 33 | 128 | $this->pushCaseSensitivityToContext($context); |
|
| 34 | |||
| 35 | 128 | $text = $context->handleCase($this->text); |
|
| 36 | 128 | for ($c = 0; $c < $this->length; $c++) { |
|
| 37 | 128 | if ($offset + $c >= mb_strlen($input) || $text[$c] != $context->handleCase($input[$offset + $c])) { |
|
| 38 | 42 | $this->popCaseSensitivityFromContext($context); |
|
| 39 | |||
| 40 | 42 | return $this->failure($input, $offset, $c); |
|
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | 103 | $this->popCaseSensitivityFromContext($context); |
|
| 45 | |||
| 46 | 103 | return $this->success($input, $offset, $this->length); |
|
| 47 | } |
||
| 54 |