Completed
Push — master ( 19ef02...ae387a )
by Mauro
02:01
created
app/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 $app->get('/version', 'App\Controller\DefaultController:getVersion');
5 5
 $app->get('/status', 'App\Controller\DefaultController:getStatus');
6 6
 
7
-$app->group('/api/v1', function () use ($app) {
8
-    $app->group('/tasks', function () use ($app) {
7
+$app->group('/api/v1', function() use ($app) {
8
+    $app->group('/tasks', function() use ($app) {
9 9
         $app->get('', 'App\Controller\Task\GetAllTasks');
10 10
         $app->get('/[{id}]', 'App\Controller\Task\GetOneTask');
11 11
         $app->get('/search/[{query}]', 'App\Controller\Task\SearchTasks');
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         $app->put('/[{id}]', 'App\Controller\Task\UpdateTask');
14 14
         $app->delete('/[{id}]', 'App\Controller\Task\DeleteTask');
15 15
     });
16
-    $app->group('/users', function () use ($app) {
16
+    $app->group('/users', function() use ($app) {
17 17
         $app->get('', 'App\Controller\User\GetAllUsers');
18 18
         $app->get('/[{id}]', 'App\Controller\User\GetOneUser');
19 19
         $app->get('/search/[{query}]', 'App\Controller\User\SearchUsers');
Please login to merge, or discard this patch.
app/dependencies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @param ContainerInterface $c
12 12
  * @return PDO
13 13
  */
14
-$container['db'] = function (ContainerInterface $c) {
14
+$container['db'] = function(ContainerInterface $c) {
15 15
     $db = $c->get('settings')['db'];
16 16
     $database = sprintf('mysql:host=%s;dbname=%s', $db['host'], $db['dbname']);
17 17
     $pdo = new PDO($database, $db['user'], $db['pass']);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @param ContainerInterface $c
28 28
  * @return bool|Logger
29 29
  */
30
-$container['logger'] = function (ContainerInterface $c) {
30
+$container['logger'] = function(ContainerInterface $c) {
31 31
     $settings = $c->get('settings')['logger'];
32 32
     if ($settings['enabled'] === false) {
33 33
         return false;
Please login to merge, or discard this patch.
src/Handlers/ApiError.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/services.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @param ContainerInterface $container
13 13
  * @return UserService
14 14
  */
15
-$container['user_service'] = function ($container) {
15
+$container['user_service'] = function($container) {
16 16
     return new UserService($container->get('user_repository'));
17 17
 };
18 18
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * @param ContainerInterface $container
21 21
  * @return UserRepository
22 22
  */
23
-$container['user_repository'] = function ($container) {
23
+$container['user_repository'] = function($container) {
24 24
     return new UserRepository($container->get('db'));
25 25
 };
26 26
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
  * @param ContainerInterface $container
29 29
  * @return TaskService
30 30
  */
31
-$container['task_service'] = function ($container) {
31
+$container['task_service'] = function($container) {
32 32
     return new TaskService($container->get('task_repository'));
33 33
 };
34 34
 
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
  * @param ContainerInterface $container
37 37
  * @return TaskRepository
38 38
  */
39
-$container['task_repository'] = function ($container) {
39
+$container['task_repository'] = function($container) {
40 40
     return new TaskRepository($container->get('db'));
41 41
 };
42 42
 
43 43
 /**
44 44
  * @return ApiError
45 45
  */
46
-$container["errorHandler"] = function () {
46
+$container["errorHandler"] = function() {
47 47
     return new ApiError;
48 48
 };
Please login to merge, or discard this patch.