Test Setup Failed
Branch master (60707e)
by Sergi
09:48
created
app/Http/Controllers/TagController.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,6 @@
 block discarded – undo
52 52
     /**
53 53
      * Store a newly created resource in storage.
54 54
      *
55
-     * @param  \Illuminate\Http\Request  $request
56 55
      * @return \Illuminate\Http\Response
57 56
      */
58 57
     public function store()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
5 5
 use App\Tag;
6 6
 use App\Transformers\TagTransformer;
7 7
 use Illuminate\Http\Request;
8
-
9
-use App\Http\Requests;
10 8
 use App\Http\Controllers\Controller;
11 9
 use Illuminate\Support\Facades\Response;
12 10
 use Symfony\Component\Console\Input\Input;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function store()
59 59
     {
60 60
 
61
-        if (! Input::get('name') or ! Input::get('done') or ! Input::get('priority'))
61
+        if ( ! Input::get('name') or ! Input::get('done') or ! Input::get('priority'))
62 62
         {
63 63
             return $this->setStatusCode(IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY)
64 64
                 ->respondWithError('Parameters failed validation for a tag.');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $tag = Tag::find($id);
81 81
         // $task = Task::where('id',$id)->first();
82 82
 
83
-        if (! $tag){
83
+        if ( ! $tag) {
84 84
             return Response::json([
85 85
 
86 86
                 'error' => [
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function update(Request $request, $id)
116 116
     {
117
-        $tag =  Tag::findorFail($id);
117
+        $tag = Tag::findorFail($id);
118 118
         $this->saveTag($request, $tag);
119 119
     }
120 120
 
Please login to merge, or discard this patch.
app/Http/Controllers/TaskController.php 4 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,6 @@
 block discarded – undo
52 52
     /**
53 53
      * Store a newly created resource in storage.
54 54
      *
55
-     * @param  \Illuminate\Http\Request  $request
56 55
      * @return \Illuminate\Http\Response
57 56
      */
58 57
     public function store()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use App\Task;
6 6
 use Illuminate\Http\Request;
7
-
8
-use App\Http\Requests;
9 7
 use App\Http\Controllers\Controller;
10 8
 use Illuminate\Support\Facades\Response;
11 9
 use App\Transformers\TaskTransformer;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
 
80 80
         $task = Task::find($id);
81
-       // $task = Task::where('id',$id)->first();
81
+        // $task = Task::where('id',$id)->first();
82 82
 
83 83
         if (! $task){
84 84
             return Response::json([
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             ], 404);
91 91
         }
92 92
         return Response::json([
93
-             $this->taskTransfomer->transform($task)
93
+                $this->taskTransfomer->transform($task)
94 94
         ], 200);
95 95
     }
96 96
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function store()
59 59
     {
60 60
 
61
-        if (! Input::get('name') or ! Input::get('done') or ! Input::get('priority'))
61
+        if ( ! Input::get('name') or ! Input::get('done') or ! Input::get('priority'))
62 62
         {
63 63
             return $this->setStatusCode(IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY)
64 64
                 ->respondWithError('Parameters failed validation for a task.');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $task = Task::find($id);
81 81
        // $task = Task::where('id',$id)->first();
82 82
 
83
-        if (! $task){
83
+        if ( ! $task) {
84 84
             return Response::json([
85 85
 
86 86
                 'error' => [
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function update(Request $request, $id)
116 116
     {
117
-        $task =  Task::findorFail($id);
117
+        $task = Task::findorFail($id);
118 118
         $this->saveTask($request, $task);
119 119
     }
120 120
 
Please login to merge, or discard this patch.
app/Transformers/TaskTransformer.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: sergi
5
- * Date: 11/01/16
6
- * Time: 18:25
7
- */
3
+     * Created by PhpStorm.
4
+     * User: sergi
5
+     * Date: 11/01/16
6
+     * Time: 18:25
7
+     */
8 8
 
9 9
 namespace App\Transformers;
10 10
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
         return [
21 21
             'name' => $task['name'],
22
-            'priority' => (integer)$task['priority'],
22
+            'priority' => (integer) $task['priority'],
23 23
             'done' =>(boolean) $task['done']
24 24
         ];
25 25
 
Please login to merge, or discard this patch.
app/Transformers/Transformer.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function transformCollection($items){
16 16
         return array_map([$this, 'transform'], $items->toArray());
17 17
     }
18
-  /*  public function transform($item)
18
+    /*  public function transform($item)
19 19
     {
20 20
 
21 21
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 abstract class Transformer
13 13
 {
14 14
 
15
-    public function transformCollection($items){
15
+    public function transformCollection($items) {
16 16
         return array_map([$this, 'transform'], $items->toArray());
17 17
     }
18 18
   /*  public function transform($item)
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/routes.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::get('/', function () {
14
+Route::get('/', function() {
15 15
     return view('welcome');
16 16
 });
17 17
 
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 Route::resource('tasks', 'TaskController');
21 21
 Route::resource('tags', 'TagController');
22 22
 
23
-Route::get('task','TaskController@index');
24
-Route::get('task/{id}','TaskController@show');
25
-Route::post('task','TaskController@store');
26
-Route::put('task/{id}','TaskController@update');
27
-Route::delete('task/{id}','TaskController@destroy');
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');
23
+Route::get('task', 'TaskController@index');
24
+Route::get('task/{id}', 'TaskController@show');
25
+Route::post('task', 'TaskController@store');
26
+Route::put('task/{id}', 'TaskController@update');
27
+Route::delete('task/{id}', 'TaskController@destroy');
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');
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.