| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 2.864 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 3 | public function evaluate(RuleInterface $rule, RuleSubjectInterface $subject) |
|
| 47 | { |
||
| 48 | try { |
||
| 49 | 3 | return $this->expression->evaluate($rule->getValue(), [$subject->getSubjectType() => $subject]); |
|
| 50 | } catch (\Exception $e) { |
||
| 51 | $this->logger->warning($e->getMessage()); |
||
| 52 | } |
||
| 53 | |||
| 54 | return false; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |