Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | public static function validate(string $uuid, int $version = null) |
||
|
|||
54 | { |
||
55 | if ($version === null) { |
||
56 | return RamseyUuid::isValid($value); |
||
57 | } |
||
58 | |||
59 | try { |
||
60 | $uuid = RamseyUuid::fromString($value); |
||
61 | |||
62 | return $uuid->getVersion() === $version; |
||
63 | } catch (InvalidUuidStringException $e) { |
||
64 | return false; |
||
65 | } |
||
68 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.