@@ -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, |
@@ -7,7 +7,7 @@ |
||
7 | 7 | class AppGlobalId extends GlobalId |
8 | 8 | { |
9 | 9 | /** |
10 | - * @param $globalId |
|
10 | + * @param string $globalId |
|
11 | 11 | * @return int|null |
12 | 12 | */ |
13 | 13 | public static function getIdFromGlobalId(?string $globalId): ?string |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace App\Vehicle\App\Mutation; |
4 | 4 | |
5 | 5 | use App\Common\App\Transformer\AppGlobalId; |
6 | -use App\Common\Domain\MutationException; |
|
7 | 6 | use App\Common\Domain\ValidationException; |
8 | 7 | use App\Vehicle\Domain\Car; |
9 | 8 | use App\Vehicle\Domain\VehicleRepositoryInterface; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace App\Vehicle\App\Mutation; |
4 | 4 | |
5 | 5 | use App\Common\App\Transformer\AppGlobalId; |
6 | -use App\Common\Domain\MutationException; |
|
7 | 6 | use App\Common\Domain\ValidationException; |
8 | 7 | use App\Vehicle\Domain\Truck; |
9 | 8 | use App\Vehicle\Domain\VehicleRepositoryInterface; |
@@ -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 | 'field' => $violation->getPropertyPath(), |
24 | 24 | 'message' => $violation->getMessage(), |