Passed
Push — master ( 8475f2...95bd7d )
by Quim González
03:21
created
app/Http/Requests/UpdateUser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function authorize()
17 17
     {
18
-        if ($this->hasPermissionTo('update-users')) return true;
18
+        if ($this->hasPermissionTo('update-users')) {
19
+            return true;
20
+        }
19 21
         return false;
20 22
     }
21 23
 
Please login to merge, or discard this patch.
app/Http/Requests/StoreTask.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,12 @@
 block discarded – undo
16 16
      */
17 17
     public function authorize()
18 18
     {
19
-        if ($this->hasPermissionTo('store-tasks')) return true;
20
-        if (Auth::user()->id === $this->user_id) return true;
19
+        if ($this->hasPermissionTo('store-tasks')) {
20
+            return true;
21
+        }
22
+        if (Auth::user()->id === $this->user_id) {
23
+            return true;
24
+        }
21 25
         return false;
22 26
         //return Auth::user()->HasPermissionTo('store-tasks');
23 27
     }
Please login to merge, or discard this patch.
app/Http/Requests/ListUser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
      */
17 17
     public function authorize()
18 18
     {
19
-        if ($this->hasPermissionTo('list-users')) return true;
19
+        if ($this->hasPermissionTo('list-users')) {
20
+            return true;
21
+        }
20 22
         return false;
21 23
     }
22 24
 
Please login to merge, or discard this patch.
app/Http/Requests/ShowTask.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function authorize()
18 18
     {
19
-        if($this->HasPermissionTo('show-tasks')) return true;
19
+        if ($this->HasPermissionTo('show-tasks')) return true;
20 20
         if ($this->owns('tasks')) return true;
21 21
         return false;
22 22
         //return Auth::user()->HasPermissionTo('show-tasks');
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,12 @@
 block discarded – undo
16 16
      */
17 17
     public function authorize()
18 18
     {
19
-        if($this->HasPermissionTo('show-tasks')) return true;
20
-        if ($this->owns('tasks')) return true;
19
+        if($this->HasPermissionTo('show-tasks')) {
20
+            return true;
21
+        }
22
+        if ($this->owns('tasks')) {
23
+            return true;
24
+        }
21 25
         return false;
22 26
         //return Auth::user()->HasPermissionTo('show-tasks');
23 27
     }
Please login to merge, or discard this patch.
app/Http/Requests/Traits/ChecksPermissions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param $model
30 30
      * @return bool
31 31
      */
32
-    protected function owns($model,$field = 'user_id')
32
+    protected function owns($model, $field = 'user_id')
33 33
     {
34 34
         //todo
35 35
         if (Auth::user()->id == $this->$model->$field) return true;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
      */
20 20
     protected function hasPermissionTo($permission)
21 21
     {
22
-        if (Auth::user()->hasPermissionTo($permission)) return true;
22
+        if (Auth::user()->hasPermissionTo($permission)) {
23
+            return true;
24
+        }
23 25
         return false;
24 26
     }
25 27
 
@@ -32,7 +34,9 @@  discard block
 block discarded – undo
32 34
     protected function owns($model,$field = 'user_id')
33 35
     {
34 36
         //todo
35
-        if (Auth::user()->id == $this->$model->$field) return true;
37
+        if (Auth::user()->id == $this->$model->$field) {
38
+            return true;
39
+        }
36 40
         return false;
37 41
     }
38 42
 }
39 43
\ No newline at end of file
Please login to merge, or discard this patch.
app/Http/Requests/DestroyUser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function authorize()
17 17
     {
18
-        if ($this->hasPermissionTo('destroy-users')) return true;
18
+        if ($this->hasPermissionTo('destroy-users')) {
19
+            return true;
20
+        }
19 21
         return false;
20 22
     }
21 23
 
Please login to merge, or discard this patch.
app/Http/Requests/ShowUser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function authorize()
17 17
     {
18
-        if ($this->hasPermissionTo('show-users')) return true;
18
+        if ($this->hasPermissionTo('show-users')) {
19
+            return true;
20
+        }
19 21
         return false;
20 22
     }
21 23
 
Please login to merge, or discard this patch.
app/Http/Requests/StoreUser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function authorize()
17 17
     {
18
-        if ($this->hasPermissionTo('store-users')) return true;
18
+        if ($this->hasPermissionTo('store-users')) {
19
+            return true;
20
+        }
19 21
         return false;
20 22
     }
21 23
 
Please login to merge, or discard this patch.
app/Http/Requests/DestroyTask.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function authorize()
19 19
     {
20 20
 
21
-        if($this->HasPermissionTo('destroy-tasks')) return true;
21
+        if ($this->HasPermissionTo('destroy-tasks')) return true;
22 22
         if ($this->owns('tasks')) return true;
23 23
         return false;
24 24
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,12 @@
 block discarded – undo
18 18
     public function authorize()
19 19
     {
20 20
 
21
-        if($this->HasPermissionTo('destroy-tasks')) return true;
22
-        if ($this->owns('tasks')) return true;
21
+        if($this->HasPermissionTo('destroy-tasks')) {
22
+            return true;
23
+        }
24
+        if ($this->owns('tasks')) {
25
+            return true;
26
+        }
23 27
         return false;
24 28
 
25 29
         //return Auth::user()->HasPermissionTo('destroy-tasks');
Please login to merge, or discard this patch.