| 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 | 4 | return true; |
|
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | 2 | return false; |
|
| 41 | } |
||
| 42 | } |