@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | parent::__construct( |
13 | 13 | $name, |
14 | - function ($globalId) { |
|
14 | + function($globalId) { |
|
15 | 15 | return sprintf( |
16 | 16 | '\%s::getIdFromGlobalId(%s)', |
17 | 17 | AppGlobalId::class, |
@@ -34,7 +34,7 @@ |
||
34 | 34 | { |
35 | 35 | $query = VehiclesQuery::createFromArgument($argument); |
36 | 36 | |
37 | - $paginator = new Paginator(function ($offset, $limit) use ($query) { |
|
37 | + $paginator = new Paginator(function($offset, $limit) use ($query) { |
|
38 | 38 | if ($offset !== null && $limit !== null) { |
39 | 39 | $query |
40 | 40 | ->setLimit($limit) |
@@ -157,9 +157,9 @@ |
||
157 | 157 | public static function createFromArgument(Argument $argument): VehiclesQuery |
158 | 158 | { |
159 | 159 | return new self( |
160 | - ($argument->offsetGet('owner'))? AppGlobalId::getIdFromGlobalId($argument->offsetGet('owner')) : null, |
|
161 | - ($argument->offsetGet('id'))? AppGlobalId::getIdFromGlobalId($argument->offsetGet('id')) : null, |
|
162 | - ($argument->offsetGet('after'))? AppGlobalId::getIdFromGlobalId($argument->offsetGet('after')) : null |
|
160 | + ($argument->offsetGet('owner')) ? AppGlobalId::getIdFromGlobalId($argument->offsetGet('owner')) : null, |
|
161 | + ($argument->offsetGet('id')) ? AppGlobalId::getIdFromGlobalId($argument->offsetGet('id')) : null, |
|
162 | + ($argument->offsetGet('after')) ? AppGlobalId::getIdFromGlobalId($argument->offsetGet('after')) : null |
|
163 | 163 | ); |
164 | 164 | } |
165 | 165 | } |
@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | |
7 | 7 | class AppGlobalId extends GlobalId |
8 | 8 | { |
9 | + /** |
|
10 | + * @return string |
|
11 | + */ |
|
9 | 12 | public static function getIdFromGlobalId(?string $globalId): ?string |
10 | 13 | { |
11 | 14 | $decodedGlobalId = parent::fromGlobalId($globalId); |
@@ -17,6 +20,9 @@ discard block |
||
17 | 20 | return $decodedGlobalId['id']; |
18 | 21 | } |
19 | 22 | |
23 | + /** |
|
24 | + * @param string $globalId |
|
25 | + */ |
|
20 | 26 | public static function getTypeFromGlobalId(?string $globalId): ?string |
21 | 27 | { |
22 | 28 | $decodedGlobalId = parent::fromGlobalId($globalId); |