1 | <?php |
||
2 | |||
3 | /* |
||
4 | * identity (https://github.com/phpgears/identity). |
||
5 | * Identity objects for PHP. |
||
6 | * |
||
7 | * @license MIT |
||
8 | * @link https://github.com/phpgears/identity |
||
9 | * @author Julián Gutiérrez <[email protected]> |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace Gears\Identity; |
||
15 | |||
16 | use Gears\Identity\Exception\UnsupportedIdentityException; |
||
17 | use Ramsey\Uuid\Uuid; |
||
18 | |||
19 | /** |
||
20 | * UUID version 6 (ordered UUID) identity generator. |
||
21 | */ |
||
22 | class OrderedUuidIdentityGenerator implements IdentityGenerator |
||
23 | { |
||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @return UuidIdentity |
||
28 | */ |
||
29 | public function generate() |
||
30 | { |
||
31 | if (!\interface_exists('Ramsey\Uuid\DeprecatedUuidInterface')) { |
||
32 | throw new UnsupportedIdentityException( |
||
33 | 'Ordered UUID (version 6) not available. Update ramsey/uuid to version ^4.0.' |
||
34 | ); |
||
35 | } |
||
36 | |||
37 | return UuidIdentity::fromString(Uuid::uuid6()->toString()); |
||
0 ignored issues
–
show
|
|||
38 | } |
||
39 | } |
||
40 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.