Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
36 | 1 | public function scan(Context $context) |
|
37 | { |
||
38 | 1 | $index = $context->getCursor(); |
|
39 | 1 | $context->increaseDepth(); |
|
40 | 1 | $value = $this->rule->scan($context); |
|
41 | 1 | $context->decreaseDepth(); |
|
42 | 1 | $context->setCursor($index); |
|
43 | |||
44 | 1 | if ($value === false) { |
|
45 | 1 | $context->error($this, $index); |
|
46 | 1 | return false; |
|
47 | } |
||
48 | |||
49 | 1 | return true; |
|
50 | } |
||
51 | } |
||
52 |