Passed
Pull Request — master (#14)
by ARCANEDEV
05:47
created
src/Helpers/UI/Actions/LinkAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         return static::make()->href($url)->class($action['class'])
42 42
             ->html($withText ? $icon.' '.$text : $icon)
43
-            ->unless($withText, function (LinkAction $link) use ($text) {
43
+            ->unless($withText, function(LinkAction $link) use ($text) {
44 44
                 return $link->tooltip($text);
45 45
             });
46 46
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function setDisabled(bool $disabled)
76 76
     {
77
-        return $this->if($disabled, function (LinkAction $link) {
77
+        return $this->if($disabled, function(LinkAction $link) {
78 78
             return $link->href('#')
79 79
                 ->class('btn btn-sm btn-outline-secondary disabled');
80 80
         });
Please login to merge, or discard this patch.
src/Helpers/UI/Actions/ButtonAction.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         return static::make()->class($action['class'])
41 41
             ->html($withText ? $icon.' '.$text : $icon)
42
-            ->unless($withText, function (ButtonAction $link) use ($text) {
42
+            ->unless($withText, function(ButtonAction $link) use ($text) {
43 43
                 return $link->tooltip($text);
44 44
             });
45 45
     }
Please login to merge, or discard this 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/Sidebar/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function setSelected($name): Collection
54 54
     {
55
-        return $this->transform(function (Item $item) use ($name) {
55
+        return $this->transform(function(Item $item) use ($name) {
56 56
             return $item->setSelected($name);
57 57
         });
58 58
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function hasAnySelected(): bool
71 71
     {
72
-        return $this->filter(function (Item $item) {
72
+        return $this->filter(function(Item $item) {
73 73
             return $item->isActive();
74 74
         })->isNotEmpty();
75 75
     }
Please login to merge, or discard this patch.
src/Support/Http/Controller.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
 
161 161
         return tap(
162 162
             view()->make($name, $data, array_merge($this->viewData, $mergeData)),
163
-            function ($view) {
163
+            function($view) {
164 164
                 $this->postRenderingView($view);
165 165
             }
166 166
         );
Please login to merge, or discard this 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/System/SystemServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             Providers\ViewServiceProvider::class,
32 32
         ]);
33 33
 
34
-        $this->app->booting(function (Application $app) {
34
+        $this->app->booting(function(Application $app) {
35 35
             /** @var  \Illuminate\Contracts\Config\Repository  $config */
36 36
             $config = $app['config'];
37 37
 
Please login to merge, or discard this patch.
src/System/Http/Routes/SystemRoutes.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
27
+        $this->adminGroup(function() {
28 28
             // admin::system.index
29 29
             $this->get('/', [SystemController::class, 'index'])
30 30
                  ->name('index');
Please login to merge, or discard this 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
             static::mapRouteClasses([
33 33
                 AbilitiesRoutes::class,
Please login to merge, or discard this patch.
src/System/Http/Controllers/LogViewerController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@
 block discarded – undo
103 103
         $log     = $this->getLogOrFail($date);
104 104
         $levels  = $this->logViewer->levelsNames();
105 105
         $entries = $log->entries($level)
106
-            ->unless(is_null($query = $request->get('query')), function (LogEntryCollection $entries) use ($query) {
107
-                return $entries->filter(function (LogEntry $value) use ($query) {
106
+            ->unless(is_null($query = $request->get('query')), function(LogEntryCollection $entries) use ($query) {
107
+                return $entries->filter(function(LogEntry $value) use ($query) {
108 108
                     return Str::contains($value->header, $query);
109 109
                 });
110 110
             })
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,8 +117,9 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $this->authorize(LogViewerPolicy::ability('delete'));
119 119
 
120
-        if ( ! $this->logViewer->delete($date))
121
-            return $this->jsonResponseError();
120
+        if ( ! $this->logViewer->delete($date)) {
121
+                    return $this->jsonResponseError();
122
+        }
122 123
 
123 124
         $this->notifySuccess(__('Log Deleted'), __('The log file has been successfully deleted!'));
124 125
 
@@ -164,8 +165,7 @@  discard block
 block discarded – undo
164 165
     {
165 166
         try {
166 167
             return $this->logViewer->get($date);
167
-        }
168
-        catch (LogNotFoundException $e) {
168
+        } catch (LogNotFoundException $e) {
169 169
             abort(404, $e->getMessage());
170 170
         }
171 171
 
Please login to merge, or discard this patch.
src/System/Http/Controllers/AbilitiesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
      */
79 79
     protected function getAbilities()
80 80
     {
81
-        return $this->manager->abilities()->map(function (Ability $ability) {
81
+        return $this->manager->abilities()->map(function(Ability $ability) {
82 82
             return $ability->setMeta('is_registered', Gate::has($ability->key()));
83 83
         });
84 84
     }
Please login to merge, or discard this patch.
src/Core/Http/Middleware/CheckForMaintenanceMode.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,13 @@
 block discarded – undo
46 46
     protected function inExceptArray($request)
47 47
     {
48 48
         foreach ($this->exceptUris() as $except) {
49
-            if ($except !== '/')
50
-                $except = trim($except, '/');
49
+            if ($except !== '/') {
50
+                            $except = trim($except, '/');
51
+            }
51 52
 
52
-            if ($request->fullUrlIs($except) || $request->is($except))
53
-                return true;
53
+            if ($request->fullUrlIs($except) || $request->is($except)) {
54
+                            return true;
55
+            }
54 56
         }
55 57
 
56 58
         return false;
Please login to merge, or discard this patch.