Passed
Pull Request — master (#14)
by ARCANEDEV
06:41
created
src/Helpers/UI/Actions/ButtonAction.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,9 @@
 block discarded – undo
73 73
      */
74 74
     public function setDisabled(bool $disabled)
75 75
     {
76
-        if ( ! $disabled)
77
-            return $this;
76
+        if ( ! $disabled) {
77
+                    return $this;
78
+        }
78 79
 
79 80
         return $this->attribute('disabled')->class('btn btn-sm btn-outline-secondary');
80 81
     }
Please login to merge, or discard this patch.
src/Helpers/MaintenanceMode.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
         if ($this->isEnabled()) {
67 67
             $data = json_decode(file_get_contents($this->path()), true);
68 68
 
69
-            if ($data['time'])
70
-                $data['time'] = Date::createFromTimestamp($data['time']);
69
+            if ($data['time']) {
70
+                            $data['time'] = Date::createFromTimestamp($data['time']);
71
+            }
71 72
         }
72 73
 
73 74
         return $data;
Please login to merge, or discard this patch.
src/Helpers/Sidebar/Item.php 1 patch
Braces   +18 added lines, -14 removed lines patch added patch discarded remove patch
@@ -204,14 +204,15 @@  discard block
 block discarded – undo
204 204
      */
205 205
     protected function parseUrl(array $attributes) : void
206 206
     {
207
-        if (isset($attributes['url']))
208
-            $this->setUrl($attributes['url']);
209
-        elseif (isset($attributes['route']))
210
-            $this->route(...Arr::wrap($attributes['route']));
211
-        elseif (isset($attributes['action']))
212
-            $this->action(...Arr::wrap($attributes['action']));
213
-        else
214
-            $this->setUrl('#');
207
+        if (isset($attributes['url'])) {
208
+                    $this->setUrl($attributes['url']);
209
+        } elseif (isset($attributes['route'])) {
210
+                    $this->route(...Arr::wrap($attributes['route']));
211
+        } elseif (isset($attributes['action'])) {
212
+                    $this->action(...Arr::wrap($attributes['action']));
213
+        } else {
214
+                    $this->setUrl('#');
215
+        }
215 216
     }
216 217
 
217 218
     /**
@@ -225,15 +226,18 @@  discard block
 block discarded – undo
225 226
     {
226 227
         $user = $user ?? auth()->user();
227 228
 
228
-        if ($user->isSuperAdmin())
229
-            return true;
229
+        if ($user->isSuperAdmin()) {
230
+                    return true;
231
+        }
230 232
 
231
-        if ($user->isOne($this->roles))
232
-            return true;
233
+        if ($user->isOne($this->roles)) {
234
+                    return true;
235
+        }
233 236
 
234
-        foreach ($this->permissions as $permission)
235
-            if ($user->can($permission))
237
+        foreach ($this->permissions as $permission) {
238
+                    if ($user->can($permission))
236 239
                 return true;
240
+        }
237 241
 
238 242
         return $this->children->filter(function (Item $item) use ($user) {
239 243
             return $item->canSee($user);
Please login to merge, or discard this patch.
src/Helpers/Sidebar/Manager.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@
 block discarded – undo
61 61
         foreach ($items as $item) {
62 62
             if (is_array($item)) {
63 63
                 $this->items->pushSidebarItem($item);
64
-            }
65
-            elseif (config()->has($item)) {
66
-                foreach (config()->get($item) as $config)
67
-                    $this->items->pushSidebarItem($config);
64
+            } elseif (config()->has($item)) {
65
+                foreach (config()->get($item) as $config) {
66
+                                    $this->items->pushSidebarItem($config);
67
+                }
68 68
             }
69 69
         }
70 70
 
Please login to merge, or discard this patch.
src/Support/Providers/PackageServiceProvider.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@
 block discarded – undo
86 86
      */
87 87
     public function packageName(): string
88 88
     {
89
-        if (empty($this->package))
90
-            throw new Exception('The package name is required');
89
+        if (empty($this->package)) {
90
+                    throw new Exception('The package name is required');
91
+        }
91 92
 
92 93
         return Str::slug($this->package);
93 94
     }
Please login to merge, or discard this patch.
src/Support/Http/Controller.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,8 +117,9 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function selectMetrics($metrics)
119 119
     {
120
-        if (is_string($metrics))
121
-            $metrics = config($metrics, []);
120
+        if (is_string($metrics)) {
121
+                    $metrics = config($metrics, []);
122
+        }
122 123
 
123 124
         app(Manager::class)->setSelected($metrics);
124 125
 
@@ -153,8 +154,9 @@  discard block
 block discarded – undo
153 154
      */
154 155
     protected function view(string $name, $data = [], $mergeData = []): ViewContract
155 156
     {
156
-        if ( ! is_null($this->viewNamespace))
157
-            $name = "{$this->viewNamespace}::{$name}";
157
+        if ( ! is_null($this->viewNamespace)) {
158
+                    $name = "{$this->viewNamespace}::{$name}";
159
+        }
158 160
 
159 161
         $this->preRenderingView();
160 162
 
Please login to merge, or discard this patch.
src/Support/Http/AdminRouteRegistrar.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
     protected function adminGroup(Closure $callback)
55 55
     {
56 56
         $this->prefix($this->getAdminPrefix())
57
-             ->middleware($this->getAdminMiddleware())
58
-             ->name('admin::')
59
-             ->group($this->prepareModuleCallback($callback));
57
+                ->middleware($this->getAdminMiddleware())
58
+                ->name('admin::')
59
+                ->group($this->prepareModuleCallback($callback));
60 60
     }
61 61
 
62 62
     /**
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     protected function dataTableGroup(Closure $callback)
68 68
     {
69 69
         $this->prefix('datatables')
70
-             ->name('datatables.')
71
-             ->middleware(['ajax'])
72
-             ->group($callback);
70
+                ->name('datatables.')
71
+                ->middleware(['ajax'])
72
+                ->group($callback);
73 73
     }
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
src/System/Http/Routes/AbilitiesRoutes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@
 block discarded – undo
28 28
             $this->prefix('abilities')->name('abilities.')->group(function () {
29 29
                 // admin::system.abilities.index
30 30
                 $this->get('/', [AbilitiesController::class, 'index'])
31
-                     ->name('index');
31
+                        ->name('index');
32 32
 
33 33
                 // admin::system.abilities.show
34 34
                 $this->get('{admin_ability_key}', [AbilitiesController::class, 'show'])
35
-                     ->name('show');
35
+                        ->name('show');
36 36
             });
37 37
         });
38 38
     }
Please login to merge, or discard this patch.
src/System/Http/Routes/SystemRoutes.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $this->adminGroup(function () {
28 28
             // admin::system.index
29 29
             $this->get('/', [SystemController::class, 'index'])
30
-                 ->name('index');
30
+                    ->name('index');
31 31
         });
32 32
     }
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.