Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
43 | 8 | private function validateUuid(string $string): void |
|
44 | { |
||
45 | 8 | $validator = \Symfony\Component\Validator\Validation::createValidator(); |
|
46 | |||
47 | 8 | $errors = $validator->validate( |
|
48 | 8 | $string, |
|
49 | 8 | new \Symfony\Component\Validator\Constraints\Uuid() |
|
50 | ); |
||
51 | |||
52 | 8 | if (count($errors) > 0) |
|
53 | { |
||
54 | 1 | throw new Exceptions\InvalidUuid($string); |
|
55 | } |
||
56 | 7 | } |
|
57 | |||
63 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.