@@ -26,8 +26,9 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | protected function passesAuthorization(): bool |
| 28 | 28 | { |
| 29 | - if (method_exists($this, 'authorize')) |
|
| 30 | - return app()->call([$this, 'authorize']); |
|
| 29 | + if (method_exists($this, 'authorize')) { |
|
| 30 | + return app()->call([$this, 'authorize']); |
|
| 31 | + } |
|
| 31 | 32 | |
| 32 | 33 | return true; |
| 33 | 34 | } |
@@ -32,8 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if ($type === 'method') { |
| 34 | 34 | $this->handleMethodAction($payload['method'], $payload['params']); |
| 35 | - } |
|
| 36 | - elseif ($type === 'model') { |
|
| 35 | + } elseif ($type === 'model') { |
|
| 37 | 36 | $this->handleModelAction($payload['name'], $payload['value']); |
| 38 | 37 | } |
| 39 | 38 | } |
@@ -60,8 +59,9 @@ discard block |
||
| 60 | 59 | { |
| 61 | 60 | $method = 'updating'.Str::studly($property); |
| 62 | 61 | |
| 63 | - if (method_exists($this, $method)) |
|
| 64 | - $this->$method(); |
|
| 62 | + if (method_exists($this, $method)) { |
|
| 63 | + $this->$method(); |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | 66 | $this->{$property} = $value; |
| 67 | 67 | } |
@@ -42,8 +42,9 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $data = $this->data(); |
| 44 | 44 | |
| 45 | - if (method_exists($this, 'initializeWithPagination')) |
|
| 46 | - $this->initializeWithPagination(); |
|
| 45 | + if (method_exists($this, 'initializeWithPagination')) { |
|
| 46 | + $this->initializeWithPagination(); |
|
| 47 | + } |
|
| 47 | 48 | |
| 48 | 49 | /** @var \Illuminate\View\View $view */ |
| 49 | 50 | $view = app()->call([$this, 'render']); |
@@ -87,8 +88,9 @@ discard block |
||
| 87 | 88 | |
| 88 | 89 | $actions = (array) $request->input('actions'); |
| 89 | 90 | |
| 90 | - if ( ! empty($actions)) |
|
| 91 | - $this->handleComponentActions($actions); |
|
| 91 | + if ( ! empty($actions)) { |
|
| 92 | + $this->handleComponentActions($actions); |
|
| 93 | + } |
|
| 92 | 94 | |
| 93 | 95 | return $this; |
| 94 | 96 | } |
@@ -88,8 +88,9 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function make(string $name): Component |
| 90 | 90 | { |
| 91 | - if ( ! $this->hasComponent($name)) |
|
| 92 | - throw ComponentNotFound::make($name); |
|
| 91 | + if ( ! $this->hasComponent($name)) { |
|
| 92 | + throw ComponentNotFound::make($name); |
|
| 93 | + } |
|
| 93 | 94 | |
| 94 | 95 | return $this->app->make($this->components[$name]); |
| 95 | 96 | } |
@@ -239,14 +239,15 @@ |
||
| 239 | 239 | */ |
| 240 | 240 | protected function parseUrl(array $attributes) : void |
| 241 | 241 | { |
| 242 | - if (isset($attributes['url'])) |
|
| 243 | - $this->setUrl($attributes['url']); |
|
| 244 | - elseif (isset($attributes['route'])) |
|
| 245 | - $this->route(...Arr::wrap($attributes['route'])); |
|
| 246 | - elseif (isset($attributes['action'])) |
|
| 247 | - $this->action(...Arr::wrap($attributes['action'])); |
|
| 248 | - else |
|
| 249 | - $this->setUrl('#'); |
|
| 242 | + if (isset($attributes['url'])) { |
|
| 243 | + $this->setUrl($attributes['url']); |
|
| 244 | + } elseif (isset($attributes['route'])) { |
|
| 245 | + $this->route(...Arr::wrap($attributes['route'])); |
|
| 246 | + } elseif (isset($attributes['action'])) { |
|
| 247 | + $this->action(...Arr::wrap($attributes['action'])); |
|
| 248 | + } else { |
|
| 249 | + $this->setUrl('#'); |
|
| 250 | + } |
|
| 250 | 251 | } |
| 251 | 252 | |
| 252 | 253 | /** |
@@ -74,8 +74,7 @@ |
||
| 74 | 74 | foreach ($items as $item) { |
| 75 | 75 | if (is_array($item)) { |
| 76 | 76 | $this->items->pushSidebarItem($item); |
| 77 | - } |
|
| 78 | - elseif (config()->has($item)) { |
|
| 77 | + } elseif (config()->has($item)) { |
|
| 79 | 78 | $this->loadFromConfig(config()->get($item)); |
| 80 | 79 | } |
| 81 | 80 | } |
@@ -125,8 +125,9 @@ |
||
| 125 | 125 | */ |
| 126 | 126 | protected function getRetryTime($retry) |
| 127 | 127 | { |
| 128 | - if (is_numeric($retry) && $retry > 0) |
|
| 129 | - return (int) $retry; |
|
| 128 | + if (is_numeric($retry) && $retry > 0) { |
|
| 129 | + return (int) $retry; |
|
| 130 | + } |
|
| 130 | 131 | |
| 131 | 132 | return null; |
| 132 | 133 | } |
@@ -74,8 +74,9 @@ |
||
| 74 | 74 | { |
| 75 | 75 | $ips = explode(PHP_EOL, (string) $this->input('allowed')); |
| 76 | 76 | |
| 77 | - if ((bool) $this->input('allow_current_ip')) |
|
| 78 | - $ips[] = $this->ip(); |
|
| 77 | + if ((bool) $this->input('allow_current_ip')) { |
|
| 78 | + $ips[] = $this->ip(); |
|
| 79 | + } |
|
| 79 | 80 | |
| 80 | 81 | return array_unique(array_filter($ips)); |
| 81 | 82 | } |
@@ -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 | |