Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
27 | 6 | public function evaluate(ValueParser $value) |
|
28 | { |
||
29 | 6 | for ($i = 1; array_key_exists($i, $this->config); $i++) { |
|
30 | 6 | if (empty($this->operators[$i])) { |
|
31 | 6 | $this->assertIsExpression($this->config[$i]); |
|
32 | 6 | $this->operators[$i] = $this->parser->parse($this->config[$i]); |
|
33 | } |
||
34 | |||
35 | 6 | if (!$this->operators[$i]->evaluate($value)) { |
|
36 | 2 | return false; |
|
37 | } |
||
38 | } |
||
39 | |||
40 | 4 | return true; |
|
41 | } |
||
42 | } |