@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @param ContainerInterface $c |
12 | 12 | * @return UserService |
13 | 13 | */ |
14 | -$container['user_service'] = function ($container) { |
|
14 | +$container['user_service'] = function($container) { |
|
15 | 15 | return new UserService($container->get('user_repository')); |
16 | 16 | }; |
17 | 17 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param ContainerInterface $c |
20 | 20 | * @return UserRepository |
21 | 21 | */ |
22 | -$container['user_repository'] = function ($container) { |
|
22 | +$container['user_repository'] = function($container) { |
|
23 | 23 | return new UserRepository($container->get('db')); |
24 | 24 | }; |
25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @param ContainerInterface $c |
28 | 28 | * @return TaskService |
29 | 29 | */ |
30 | -$container['task_service'] = function ($container) { |
|
30 | +$container['task_service'] = function($container) { |
|
31 | 31 | return new TaskService($container->get('task_repository')); |
32 | 32 | }; |
33 | 33 | |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | * @param ContainerInterface $c |
36 | 36 | * @return TaskRepository |
37 | 37 | */ |
38 | -$container['task_repository'] = function ($container) { |
|
38 | +$container['task_repository'] = function($container) { |
|
39 | 39 | return new TaskRepository($container->get('db')); |
40 | 40 | }; |
41 | 41 | |
42 | -$container["errorHandler"] = function ($container) { |
|
42 | +$container["errorHandler"] = function($container) { |
|
43 | 43 | return new App\Handlers\ApiError; |
44 | 44 | }; |
@@ -16,8 +16,8 @@ |
||
16 | 16 | ]; |
17 | 17 | $body = json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); |
18 | 18 | return $response |
19 | - ->withStatus($status) |
|
20 | - ->withHeader("Content-type", "application/json") |
|
21 | - ->write($body); |
|
19 | + ->withStatus($status) |
|
20 | + ->withHeader("Content-type", "application/json") |
|
21 | + ->write($body); |
|
22 | 22 | } |
23 | 23 | } |