@@ -4,8 +4,8 @@ discard block |
||
| 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 |
||
| 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'); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | protected function getFromCache($id) |
| 54 | 54 | { |
| 55 | 55 | $redis = $this->getRedisClient(); |
| 56 | - $key = 'api-rest-slimphp:user:'.$id; |
|
| 56 | + $key = 'api-rest-slimphp:user:' . $id; |
|
| 57 | 57 | $value = $redis->get($key); |
| 58 | 58 | |
| 59 | 59 | return json_decode($value); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | protected function saveInCache($id, $result) |
| 67 | 67 | { |
| 68 | 68 | $redis = $this->getRedisClient(); |
| 69 | - $key = 'api-rest-slimphp:user:'.$id; |
|
| 69 | + $key = 'api-rest-slimphp:user:' . $id; |
|
| 70 | 70 | $redis->set($key, json_encode($result)); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected function deleteFromCache($id) |
| 77 | 77 | { |
| 78 | 78 | $redis = $this->getRedisClient(); |
| 79 | - $key = 'api-rest-slimphp:user:'.$id; |
|
| 79 | + $key = 'api-rest-slimphp:user:' . $id; |
|
| 80 | 80 | $redis->del($key); |
| 81 | 81 | } |
| 82 | 82 | } |