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