@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function load(ObjectManager $manager) |
| 13 | 13 | { |
| 14 | 14 | foreach (self::getVehicles() as $id => $data) { |
| 15 | - switch($data['class']) { |
|
| 15 | + switch ($data['class']) { |
|
| 16 | 16 | case Car::class: |
| 17 | 17 | $vehicle = new Car($id, $data['manufacturer'], $data['model'], $data['seats']); |
| 18 | 18 | break; |
@@ -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, |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * @param $globalId |
|
| 25 | + * @param string $globalId |
|
| 26 | 26 | * @return string|null |
| 27 | 27 | */ |
| 28 | 28 | public static function getTypeFromGlobalId(?string $globalId): ?string |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $errors = []; |
| 19 | 19 | |
| 20 | 20 | $violations = $error->getViolations(); |
| 21 | - foreach($violations as $violation) { |
|
| 21 | + foreach ($violations as $violation) { |
|
| 22 | 22 | $errors[] = [ |
| 23 | 23 | 'name' => $violation->getPropertyPath(), |
| 24 | 24 | 'message' => $violation->getMessage(), |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | if (!$vehicle = $this->vehicleRepository->find($id)) { |
| 36 | 36 | throw new UserError(sprintf( |
| 37 | 37 | '%s [%s] not found', |
| 38 | - AppGlobalId::getTypeFromGlobalId($globalId) , |
|
| 38 | + AppGlobalId::getTypeFromGlobalId($globalId), |
|
| 39 | 39 | $globalId |
| 40 | 40 | )); |
| 41 | 41 | } |
@@ -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 | } |