Completed
Pull Request — master (#5858)
by
unknown
54s
created
src/Actions/RowSimpleAction.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@  discard block
 block discarded – undo
61 61
     private function renderDefault(): void
62 62
     {
63 63
         $render_key = get_called_class().'-default';
64
-        if (array_key_exists($render_key, static::$is_rendered))
65
-            return;
64
+        if (array_key_exists($render_key, static::$is_rendered)) {
65
+                    return;
66
+        }
66 67
         static::$is_rendered[$render_key] = true;
67 68
 
68 69
         $parameters = json_encode($this->parameters());
@@ -106,8 +107,9 @@  discard block
 block discarded – undo
106 107
         }
107 108
 
108 109
         $render_key = get_called_class().'-dialog';
109
-        if (array_key_exists($render_key, static::$is_rendered))
110
-            return;
110
+        if (array_key_exists($render_key, static::$is_rendered)) {
111
+                    return;
112
+        }
111 113
         static::$is_rendered[$render_key] = true;
112 114
 
113 115
         $parameters = json_encode($this->parameters());
@@ -178,8 +180,9 @@  discard block
 block discarded – undo
178 180
                 'label' => $row['label'],
179 181
             ];
180 182
 
181
-            if (!empty($row['rules']) && in_array('required', $row['rules']))
182
-                $tmp['is_required'] = 1;
183
+            if (!empty($row['rules']) && in_array('required', $row['rules'])) {
184
+                            $tmp['is_required'] = 1;
185
+            }
183 186
 
184 187
             if (array_key_exists('options', $row)) {
185 188
                 if (empty(static::$select_options)) {
@@ -201,8 +204,9 @@  discard block
 block discarded – undo
201 204
             $props[] = $tmp;
202 205
         }
203 206
 
204
-        if (!empty($props))
205
-            $this->attribute('data-props', json_encode($props, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
207
+        if (!empty($props)) {
208
+                    $this->attribute('data-props', json_encode($props, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
209
+        }
206 210
 
207 211
         $confirm = (new \ReflectionClass($this->interactor))->getProperty('confirm')->getValue($this->interactor);
208 212
         if (!empty($confirm)) {
@@ -210,8 +214,9 @@  discard block
 block discarded – undo
210 214
         }
211 215
 
212 216
         $render_key = get_called_class().'-form';
213
-        if (array_key_exists($render_key, static::$is_rendered))
214
-            return;
217
+        if (array_key_exists($render_key, static::$is_rendered)) {
218
+                    return;
219
+        }
215 220
         static::$is_rendered[$render_key] = true;
216 221
 
217 222
         $this->interactor->addModalHtml();
Please login to merge, or discard this patch.
src/Grid/Displayers/Copyable.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
     public function display(): string
32 32
     {
33 33
         $content = $this->getColumn()->getOriginal();
34
-        if (is_null($content) || $content === '')
35
-            return '';
34
+        if (is_null($content) || $content === '') {
35
+                    return '';
36
+        }
36 37
 
37 38
         $this->addScript();
38 39
 
Please login to merge, or discard this patch.
src/Auth/Database/HasPermissions.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $cache = config('admin.cache');
18 18
         $cache = $cache['enable'] ? Cache::store($cache['store']) : null;
19
-        if (!$cache)
20
-            return $this->_allPermissions();
19
+        if (!$cache) {
20
+                    return $this->_allPermissions();
21
+        }
21 22
 
22 23
         $cache_key = 'admin_permissions_all_'.$this->id;
23 24
         $permissions = $cache->get($cache_key);
@@ -113,8 +114,9 @@  discard block
 block discarded – undo
113 114
     public function isAdministrator(): bool
114 115
     {
115 116
         static $res = [];
116
-        if (!isset($res[$this->id]))
117
-            $res[$this->id] = $this->isRole('administrator');
117
+        if (!isset($res[$this->id])) {
118
+                    $res[$this->id] = $this->isRole('administrator');
119
+        }
118 120
         return $res[$this->id];
119 121
     }
120 122
 
Please login to merge, or discard this patch.
src/Auth/Database/Menu.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@
 block discarded – undo
67 67
     {
68 68
         $cache = config('admin.cache');
69 69
         $cache = $cache['enable'] ? Cache::store($cache['store']) : null;
70
-        if (!$cache)
71
-            return $this->_allNodes();
70
+        if (!$cache) {
71
+                    return $this->_allNodes();
72
+        }
72 73
 
73 74
         $cache_key = 'admin_menu_'.$this->id;
74 75
         $nodes = $cache->get($cache_key);
Please login to merge, or discard this patch.