Completed
Pull Request — master (#5)
by Mauro
02:33
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.
src/Controller/User/GetOneUser.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Controller\User;
4 4
 
5
-use App\Controller\BaseController;
6 5
 use Slim\Http\Request;
7 6
 use Slim\Http\Response;
8 7
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         
30 30
         $this->setParams($request, $response, $args);
31 31
         $client = new \Predis\Client();
32
-        $key = 'api-rest-slimphp:user:'.$this->args['id'];
32
+        $key = 'api-rest-slimphp:user:' . $this->args['id'];
33 33
         $value = $client->get($key);
34 34
         if (!is_null($value)) {
35 35
             $result = json_decode($value);
Please login to merge, or discard this patch.