Conditions | 5 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function check($value = null): bool |
||
21 | { |
||
22 | if (!parent::check($value)) { |
||
23 | return false; |
||
24 | } |
||
25 | |||
26 | if (is_null($value) && $this->nullable) { |
||
27 | return true; |
||
28 | } |
||
29 | |||
30 | if ((preg_match('/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/', (string)$value) !== 1)) |
||
31 | return false; |
||
32 | |||
33 | return true; |
||
34 | } |
||
36 |