| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 5 | public function validate($value, string $valueIdentifier = null):bool |
|
| 17 | { |
||
| 18 | 5 | $this->value = $value; |
|
| 19 | 5 | if (isset($this->options[self::OPTION_ITEM])) { |
|
| 20 | 3 | $this->success = ($value == $this->context->getItemValue($this->options[self::OPTION_ITEM])); |
|
| 21 | } else { |
||
| 22 | 2 | $this->success = true; |
|
| 23 | } |
||
| 24 | |||
| 25 | 5 | return $this->success; |
|
| 26 | } |
||
| 27 | } |
||
| 28 |