Test Setup Failed
Branch master (790aa1)
by francesc
09:03
created
app/Http/Controllers/TagController.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * Display a listing of the resource.
28 28
      *
29
-     * @return \Illuminate\Http\Response
29
+     * @return \Illuminate\Http\JsonResponse
30 30
      */
31 31
     public function index()
32 32
     {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * Display the specified resource.
69 69
      *
70 70
      * @param  int  $id
71
-     * @return \Illuminate\Http\Response
71
+     * @return \Illuminate\Http\JsonResponse
72 72
      */
73 73
     public function show($id)
74 74
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\Http\Controllers\Controller;
9 7
 use App\Tag;
10 8
 use App\Http\Transformers\TagTransformer;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,12 +73,12 @@
 block discarded – undo
73 73
     public function show($id)
74 74
     {
75 75
         $tag = Tag::find($id);
76
-        if(!$tag){
76
+        if (!$tag) {
77 77
             return response() -> json([
78 78
                 "msg" => "does not exist"
79 79
             ], 404
80 80
             );
81
-        }else{
81
+        } else {
82 82
             return response() -> json([
83 83
                 "msg" => "Success",
84 84
                 "tag" =>  $this->TagTransformer->transform($tag)
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
                 "msg" => "does not exist"
79 79
             ], 404
80 80
             );
81
-        }else{
81
+        } else{
82 82
             return response() -> json([
83 83
                 "msg" => "Success",
84 84
                 "tag" =>  $this->TagTransformer->transform($tag)
Please login to merge, or discard this patch.
app/Http/Controllers/TaskController.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\Task;
9 7
 use App\Http\Controllers\Controller;
10 8
 use App\Http\Transformers\TaskTransformer;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function __construct(TaskTransformer $TaskTransformer)
18 18
     {
19
-         $this->TaskTransformer = $TaskTransformer;
19
+            $this->TaskTransformer = $TaskTransformer;
20 20
     }
21 21
 
22 22
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function transformCollection($task)
130 130
     {
131
-     return array_map([$this, 'transform'],$task->toArray());
131
+        return array_map([$this, 'transform'],$task->toArray());
132 132
     }
133 133
     public function transform($task)
134 134
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     public function show($id, $task)
74 74
     {
75 75
         $task = Task::find($id);
76
-        if(!$task){
76
+        if (!$task) {
77 77
             return response() -> json([
78 78
             "msg" => "does not exist"            
79 79
             ], 404
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function transformCollection($task)
130 130
     {
131
-     return array_map([$this, 'transform'],$task->toArray());
131
+     return array_map([$this, 'transform'], $task->toArray());
132 132
     }
133 133
     public function transform($task)
134 134
     {
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
     protected function schedule(Schedule $schedule)
26 26
     {
27 27
         $schedule->command('inspire')
28
-                 ->hourly();
28
+                    ->hourly();
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
app/Http/Transformers/TaskTransformer.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Transformers;
4 4
 
5
- class TaskTransformer extends Transformer
5
+    class TaskTransformer extends Transformer
6 6
 {
7 7
     public function transform($task)
8 8
     {
Please login to merge, or discard this patch.
app/Http/Transformers/Transformer.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 abstract class Transformer
6 6
 {
7
-	public function transformCollection($items)
7
+    public function transformCollection($items)
8 8
     {
9
-     return array_map([$this, 'transform'],$items->toArray());
9
+        return array_map([$this, 'transform'],$items->toArray());
10 10
     }
11 11
     public abstract function transform($items);
12 12
 }
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 {
7 7
 	public function transformCollection($items)
8 8
     {
9
-     return array_map([$this, 'transform'],$items->toArray());
9
+     return array_map([$this, 'transform'], $items->toArray());
10 10
     }
11 11
     public abstract function transform($items);
12 12
 }
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@
 block discarded – undo
10 10
 |
11 11
 */
12 12
 
13
-Route::get('/', function () {
13
+Route::get('/', function() {
14 14
     return view('welcome');
15 15
 });
16 16
 
17
-Route::resource('task','TaskController');
18
-Route::resource('tag','TagController');
17
+Route::resource('task', 'TaskController');
18
+Route::resource('tag', 'TagController');
19 19
 
20 20
 //API
21
-Route::get('task','TaskController@index');
22
-Route::get('task/{id}','TaskController@show');
23
-Route::post('task','TaskController@store');
24
-Route::put('task/{id}','TaskController@update');
25
-Route::delete('task/{id}','TaskController@destroy');
21
+Route::get('task', 'TaskController@index');
22
+Route::get('task/{id}', 'TaskController@show');
23
+Route::post('task', 'TaskController@store');
24
+Route::put('task/{id}', 'TaskController@update');
25
+Route::delete('task/{id}', 'TaskController@destroy');
26 26
 
27
-Route::get('tag','TagController@index');
28
-Route::get('tag/{id}','TagController@show');
29
-Route::post('tag','TagController@store');
30
-Route::put('tag/{id}','TagController@update');
31
-Route::delete('tag/{id}','TagController@destroy');
32 27
\ No newline at end of file
28
+Route::get('tag', 'TagController@index');
29
+Route::get('tag/{id}', 'TagController@show');
30
+Route::post('tag', 'TagController@store');
31
+Route::put('tag/{id}', 'TagController@update');
32
+Route::delete('tag/{id}', 'TagController@destroy');
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group(['namespace' => $this->namespace], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.