Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 2 | public function guard($value, ...$other): void |
|
21 | { |
||
22 | 2 | parent::guard($value); |
|
23 | /** @var ValueObjectInterface $value*/ |
||
24 | 2 | if (false === (bool)preg_match('/^[a-f0-9]{32}$/', $value->getValue())) { |
|
25 | 1 | throw new InvalidVOArgumentException('Value is not a valid md5 hash.', $value); |
|
26 | } |
||
49 |