| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 1 | public function scan(Context $context) |
|
| 39 | { |
||
| 40 | |||
| 41 | 1 | $index = $context->getCursor(); |
|
| 42 | |||
| 43 | 1 | $context->increaseDepth(); |
|
| 44 | 1 | $value = $this->rule->scan($context); |
|
| 45 | 1 | $context->decreaseDepth(); |
|
| 46 | |||
| 47 | 1 | if (is_bool($value)) { |
|
| 48 | 1 | $context->setCursor($index); |
|
| 49 | 1 | return true; |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | $result = new Result($this->name); |
|
| 53 | 1 | $result->setValue($value->getValue(), $index); |
|
| 54 | 1 | $result->addChild($value); |
|
| 55 | 1 | $this->action($result); |
|
| 56 | |||
| 57 | 1 | return $result; |
|
| 58 | } |
||
| 59 | } |
||
| 60 |