Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 1 | public function scan(Context $context) |
|
23 | { |
||
24 | 1 | $index = $context->getCursor(); |
|
25 | 1 | $value = $context->value(); |
|
26 | |||
27 | 1 | if ($value === false) { |
|
28 | 1 | $context->error($this, $index); |
|
29 | 1 | return false; |
|
30 | } |
||
31 | |||
32 | 1 | $result = new Result($this->name); |
|
33 | 1 | $result->setValue($value, $index); |
|
34 | |||
35 | 1 | return $result; |
|
36 | } |
||
37 | } |
||
38 |