Passed
Push — master ( ead8c1...2619fb )
by Reza
04:15
created
src/Http/Livewire/Admins/Update.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,11 +36,13 @@
 block discarded – undo
36 36
 
37 37
     public function update()
38 38
     {
39
-        if ($this->getRules())
40
-            $this->validate();
39
+        if ($this->getRules()) {
40
+                    $this->validate();
41
+        }
41 42
 
42
-        if ($this->selectedRoles[0] == "null")
43
-            $this->selectedRoles = [];
43
+        if ($this->selectedRoles[0] == "null") {
44
+                    $this->selectedRoles = [];
45
+        }
44 46
 
45 47
         $this->admin->roles()->sync($this->selectedRoles);
46 48
 
Please login to merge, or discard this patch.
src/Http/Livewire/Role/Update.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function update()
57 57
     {
58
-        if ($this->getRules())
59
-            $this->validate();
58
+        if ($this->getRules()) {
59
+                    $this->validate();
60
+        }
60 61
 
61 62
         if ($this->role->is_super_admin()) {
62 63
             $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('CannotUpdateMessage', ['name' => __('Role')])]);
@@ -84,8 +85,9 @@  discard block
 block discarded – undo
84 85
             $dashKey = str_replace('.', '-', $key);
85 86
             $value = is_array($value) ? array_filter($value) : $value; 
86 87
 
87
-            if (empty($value))
88
-                continue;
88
+            if (empty($value)) {
89
+                            continue;
90
+            }
89 91
 
90 92
             $this->access[$dashKey] = $value;
91 93
 
Please login to merge, or discard this patch.
src/routes.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
         if ($crud->with_acl) {
20 20
             $middleware[] = "dynamicAcl";
21 21
 
22
-            if ($crud->with_policy)
23
-                $middleware[] = "authorize";
22
+            if ($crud->with_policy) {
23
+                            $middleware[] = "authorize";
24
+            }
24 25
         }
25 26
 
26 27
         Route::prefix($crud->route)->middleware($middleware)->name("{$crud->route}.")->group(function () use ($component, $crud, $crudConfig) {
Please login to merge, or discard this patch.
src/Support/User/UserProvider.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
             'is_superuser' => $is_super,
24 24
         ]);
25 25
 
26
-        if($is_super)
27
-            $this->makeSuperAdminRole($user);
26
+        if($is_super) {
27
+                    $this->makeSuperAdminRole($user);
28
+        }
28 29
 
29 30
         return [
30 31
             'type' => 'success',
Please login to merge, or discard this patch.