Passed
Push — master ( 243c10...a54c21 )
by Quim González
02:51
created
app/Console/Kernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     protected function commands()
37 37
     {
38
-        $this->load(__DIR__.'/Commands');
38
+        $this->load(__DIR__ . '/Commands');
39 39
 
40 40
         require base_path('routes/console.php');
41 41
     }
Please login to merge, or discard this patch.
app/Console/Commands/ListTaskCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
             $this->table($headers, $tasks);
49 49
         } catch (exception $e) {
50
-            $this->error('Error: '.$e);
50
+            $this->error('Error: ' . $e);
51 51
         }
52 52
     }
53 53
 }
Please login to merge, or discard this patch.
app/Console/Commands/CreateTaskCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                 'name'=> $this->argument('name') ? $this->argument('name') : $this->ask('Event name?'),
50 50
             ]);
51 51
         } catch (Exception $e) {
52
-            $this->error('error'.$e);
52
+            $this->error('error' . $e);
53 53
         }
54 54
 
55 55
         $this->info('Task has been added to database succesfully');
Please login to merge, or discard this patch.
app/Console/Commands/DestroyTaskCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
 //
49 49
 //            ]);
50 50
         } catch (Exception $e) {
51
-            $this->error('error'.$e);
51
+            $this->error('error' . $e);
52 52
         }
53 53
         if ($count == 0) {
54 54
             $this->alert('Task does not exist');
55
-        } else {
55
+        }else {
56 56
             $this->info('Task has been deleted to database succesfully');
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         if ($this->username() === 'email') {
73 73
             return $this->attemptLoginAtAuthenticatesUsers($request);
74 74
         }
75
-        if (!$this->attemptLoginAtAuthenticatesUsers($request)) {
75
+        if ( ! $this->attemptLoginAtAuthenticatesUsers($request)) {
76 76
             return $this->attempLoginUsingUsernameAsAnEmail($request);
77 77
         }
78 78
 
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ResetPasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         // will update the password on an actual user model and persist it to the
39 39
         // database. Otherwise we will parse the error and return the response.
40 40
         $response = $this->broker()->reset(
41
-            $this->credentials($request), function ($user, $password) {
41
+            $this->credentials($request), function($user, $password) {
42 42
                 $this->resetPassword($user, $password);
43 43
             }
44 44
         );
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@  discard block
 block discarded – undo
8 8
 //funció creada per veure si el rol ja te assignat un permís, si el te no fem res, sino li assignem.
9 9
 // si no es fa així provoca error:
10 10
 //Illuminate\Database\QueryException with message 'SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: role_has_permissions.permission_id, role_has_permissions.role_id (SQL: insert into "role_has_permissions" ("permission_id", "role_id") values (1, 1))'
11
-if(!function_exists('assignPermission')){
11
+if ( ! function_exists('assignPermission')) {
12 12
 
13 13
     /**
14 14
      * @param $role
15 15
      * @param $permission
16 16
      */
17
-    function assignPermission($role, $permission){
17
+    function assignPermission($role, $permission) {
18 18
 
19
-        if(! $role->hasPermissionTo($permission)){
19
+        if ( ! $role->hasPermissionTo($permission)) {
20 20
             $role->givePermissionTo($permission);
21 21
         }
22 22
     }
23 23
 }
24 24
 
25
-if (!function_exists('initialize_task_permissions')) {
25
+if ( ! function_exists('initialize_task_permissions')) {
26 26
     function initialize_task_permissions()
27 27
     {
28 28
 
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 
36 36
         $role = Role::firstOrCreate(['name'=>'task-manager']);
37 37
 
38
-        assignPermission($role,'list-tasks');
39
-        assignPermission($role,'show-tasks');
40
-        assignPermission($role,'store-tasks');
41
-        assignPermission($role,'update-tasks');
42
-        assignPermission($role,'destroy-tasks');
38
+        assignPermission($role, 'list-tasks');
39
+        assignPermission($role, 'show-tasks');
40
+        assignPermission($role, 'store-tasks');
41
+        assignPermission($role, 'update-tasks');
42
+        assignPermission($role, 'destroy-tasks');
43 43
 
44 44
         Permission::firstOrCreate(['name' => 'list-users']);
45 45
         Permission::firstOrCreate(['name' => 'show-users']);
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
 
50 50
         $role = Role::firstOrCreate(['name' => 'users-manager']);
51 51
 
52
-       assignPermission($role,'list-users');
53
-       assignPermission($role,'show-users');
54
-       assignPermission($role,'store-users');
55
-       assignPermission($role,'update-users');
56
-       assignPermission($role,'destroy-users');
52
+       assignPermission($role, 'list-users');
53
+       assignPermission($role, 'show-users');
54
+       assignPermission($role, 'store-users');
55
+       assignPermission($role, 'update-users');
56
+       assignPermission($role, 'destroy-users');
57 57
 
58 58
     }
59 59
 }
60 60
 
61 61
 
62
-if (!function_exists('create_user')) {
62
+if ( ! function_exists('create_user')) {
63 63
     function create_user()
64 64
     {
65 65
         factory(User::class)->create([
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     }
71 71
 }
72 72
 
73
-if (!function_exists('first_user_as_task_manager')) {
73
+if ( ! function_exists('first_user_as_task_manager')) {
74 74
     function first_user_as_task_manager()
75 75
     {
76 76
         User::all()->first()->assignRole('task-manager');
Please login to merge, or discard this patch.