Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 0 |
1 | <?php |
||
20 | 7 | public function applyToNode(Node $node) |
|
21 | { |
||
22 | 7 | $instruction = $node->getInstruction($this); |
|
23 | |||
24 | 7 | if (!is_array($instruction) || count($instruction) !== 2) { |
|
25 | $node->setResult(false); |
||
26 | } |
||
27 | |||
28 | // might want to improve this check for different types using a library |
||
29 | 7 | $node->setResult($instruction[0] == $instruction[1]); |
|
30 | 7 | } |
|
31 | } |
||
32 |