@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 | }); |
@@ -39,7 +39,7 @@ |
||
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 | } |
@@ -73,8 +73,9 @@ |
||
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 | } |
@@ -52,7 +52,7 @@ discard block |
||
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 |
||
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 | } |
@@ -160,7 +160,7 @@ |
||
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 | ); |
@@ -117,8 +117,9 @@ discard block |
||
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 |
||
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 |
@@ -31,7 +31,7 @@ |
||
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 |
@@ -24,7 +24,7 @@ |
||
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'); |
@@ -27,7 +27,7 @@ |
||
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, |
@@ -103,8 +103,8 @@ |
||
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 | }) |
@@ -117,8 +117,9 @@ discard block |
||
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 |
||
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 |
@@ -78,7 +78,7 @@ |
||
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 | } |
@@ -46,11 +46,13 @@ |
||
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; |