Passed
Branch master (6955bf)
by Eric
06:07
created
app/Console/Commands/ListTasksCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
     public function handle()
40 40
     {
41 41
         try {
42
-            $headers = ['id','Name'];
42
+            $headers = ['id', 'Name'];
43 43
 
44
-            $users = Task::all(['id','name'])->toArray();
44
+            $users = Task::all(['id', 'name'])->toArray();
45 45
         } catch (Exception $e) {
46 46
             $this->error('Error');
47 47
         }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ResetPasswordController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // will update the password on an actual user model and persist it to the
38 38
         // database. Otherwise we will parse the error and return the response.
39 39
         $response = $this->broker()->reset(
40
-            $this->credentials($request), function ($user, $password) {
40
+            $this->credentials($request), function($user, $password) {
41 41
             $this->resetPassword($user, $password);
42 42
         }
43 43
         );
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param  string  $response
58 58
      * @return \Illuminate\Http\RedirectResponse
59 59
      */
60
-    protected function sendResetResponse(Request $request,$response)
60
+    protected function sendResetResponse(Request $request, $response)
61 61
     {
62 62
         if ($request->expectsJson()) {
63 63
             return response()->json([
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     protected function sendResetFailedResponse(Request $request, $response)
79 79
     {
80 80
         if ($request->expectsJson()) {
81
-            return new JsonResponse(['email' => trans($response) ], 422);
81
+            return new JsonResponse(['email' => trans($response)], 422);
82 82
         }
83 83
         return redirect()->back()
84 84
             ->withInput($request->only('email'))
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             'email'    => $data['email'],
84 84
             'password' => bcrypt($data['password']),
85 85
         ];
86
-        if (config('auth.providers.users.field','email') === 'username' && isset($data['username'])) {
86
+        if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {
87 87
             $fields['username'] = $data['username'];
88 88
         }
89 89
         return User::create($fields);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function username()
59 59
     {
60
-        return config('auth.providers.users.field','email');
60
+        return config('auth.providers.users.field', 'email');
61 61
     }
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@
 block discarded – undo
68 68
      */
69 69
     protected function attemptLogin(Request $request)
70 70
     {
71
-        if ($this->username() === 'email') return $this->attemptLoginAtAuthenticatesUsers($request);
71
+        if ($this->username() === 'email') {
72
+            return $this->attemptLoginAtAuthenticatesUsers($request);
73
+        }
72 74
         if ( ! $this->attemptLoginAtAuthenticatesUsers($request)) {
73 75
             return $this->attempLoginUsingUsernameAsAnEmail($request);
74 76
         }
Please login to merge, or discard this patch.
app/Http/Controllers/TaskController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
     {
17 17
         // TODO acabar de posar Tasques PHP en la plantilla de adminLTE
18 18
         $tasks = Task::all();
19
-        return view('tasks_php',['tasks' => $tasks]);
19
+        return view('tasks_php', ['tasks' => $tasks]);
20 20
     }
21 21
 
22 22
     public function indexVue()
23 23
     {
24 24
         $tasks = Task::all();
25
-        return view('tasks',['tasks' => json_encode($tasks)]);
25
+        return view('tasks', ['tasks' => json_encode($tasks)]);
26 26
     }
27 27
 
28 28
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/ApiTaskController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         return $task;
46 46
     }
47 47
 
48
-    public function show(ShowTask $request,Task $task)
48
+    public function show(ShowTask $request, Task $task)
49 49
     {
50 50
         return $task;
51 51
     }
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Spatie\Permission\Models\Permission;
4 4
 use Spatie\Permission\Models\Role;
5 5
 
6
-if (! function_exists('initialize_task_permission')){
6
+if ( ! function_exists('initialize_task_permission')) {
7 7
     function initialize_task_permission() {
8 8
         Permission::firstOrCreate(['name' => 'list-tasks']);
9 9
         Permission::firstOrCreate(['name' => 'show-tasks']);
Please login to merge, or discard this patch.