| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 254 | protected function parse(&$input, $offset, Context $context) |
|
| 33 | { |
||
| 34 | 254 | if ($offset >= mb_strlen($input)) { |
|
| 35 | 74 | return $this->failure($input, $offset); |
|
| 36 | } |
||
| 37 | |||
| 38 | 242 | $this->pushCaseSensitivityToContext($context); |
|
| 39 | |||
| 40 | 242 | if ($context->handleCase($input[$offset]) === $context->handleCase($this->character)) { |
|
| 41 | 214 | $this->popCaseSensitivityFromContext($context); |
|
| 42 | |||
| 43 | 214 | return $this->makeMatch($this->include, $input, $offset, 1); |
|
| 44 | } |
||
| 45 | |||
| 46 | 102 | $this->popCaseSensitivityFromContext($context); |
|
| 47 | |||
| 48 | 102 | return $this->makeMatch(!$this->include, $input, $offset, 1); |
|
| 49 | } |
||
| 56 |