@@ -74,7 +74,7 @@ |
||
| 74 | 74 | /** |
| 75 | 75 | * Log the user. |
| 76 | 76 | * |
| 77 | - * @return \Illuminate\Http\RedirectReponse |
|
| 77 | + * @return \Illuminate\Http\RedirectResponse |
|
| 78 | 78 | */ |
| 79 | 79 | public function getLogout() |
| 80 | 80 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Flare; |
| 6 | 6 | use Response; |
| 7 | -use Illuminate\Http\Request; |
|
| 8 | 7 | use Illuminate\Support\Facades\Auth; |
| 9 | 8 | use Illuminate\Contracts\Auth\Guard; |
| 10 | 9 | use LaravelFlare\Flare\Admin\AdminManager; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $view = 'admin.dashboard'; |
| 56 | 56 | |
| 57 | 57 | if (!view()->exists($view)) { |
| 58 | - $view = 'flare::'.$view; |
|
| 58 | + $view = 'flare::' . $view; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | return view($view, ['widgets' => (new WidgetAdminManager())]); |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | /** |
| 528 | 528 | * Determine if the Model Admin has Viewing Capabilities. |
| 529 | 529 | * |
| 530 | - * @return bool |
|
| 530 | + * @return null|boolean |
|
| 531 | 531 | */ |
| 532 | 532 | public function hasViewing() |
| 533 | 533 | { |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | /** |
| 599 | 599 | * Determine if the Model Admin has Validating Capabilities. |
| 600 | 600 | * |
| 601 | - * @return bool |
|
| 601 | + * @return null|boolean |
|
| 602 | 602 | */ |
| 603 | 603 | public function hasValidating() |
| 604 | 604 | { |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | * |
| 621 | 621 | * @param string $trait |
| 622 | 622 | * |
| 623 | - * @return bool |
|
| 623 | + * @return null|boolean |
|
| 624 | 624 | */ |
| 625 | 625 | public function hasTrait($trait = null) |
| 626 | 626 | { |
@@ -636,7 +636,7 @@ discard block |
||
| 636 | 636 | * |
| 637 | 637 | * @param string $contract |
| 638 | 638 | * |
| 639 | - * @return bool |
|
| 639 | + * @return boolean|null |
|
| 640 | 640 | */ |
| 641 | 641 | public function hasContract($contract = null) |
| 642 | 642 | { |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if (($methodBreaker = strpos($field, '.')) !== false) { |
| 243 | 243 | $method = substr($field, 0, $methodBreaker); |
| 244 | 244 | if (method_exists($this->model, $method)) { |
| 245 | - if (method_exists($this->model->$method(), $submethod = str_replace($method.'.', '', $field))) { |
|
| 245 | + if (method_exists($this->model->$method(), $submethod = str_replace($method . '.', '', $field))) { |
|
| 246 | 246 | $this->model->$method()->$submethod(); |
| 247 | 247 | |
| 248 | 248 | $columns[$field] = $fieldTitle; |
@@ -318,13 +318,13 @@ discard block |
||
| 318 | 318 | $formattedKey = str_replace('.', '_', $key); |
| 319 | 319 | |
| 320 | 320 | if ($this->hasGetAccessor($formattedKey)) { |
| 321 | - $method = 'get'.Str::studly($formattedKey).'Attribute'; |
|
| 321 | + $method = 'get' . Str::studly($formattedKey) . 'Attribute'; |
|
| 322 | 322 | |
| 323 | 323 | return $this->{$method}($model); |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | if ($this->hasGetAccessor($key)) { |
| 327 | - $method = 'get'.Str::studly($key).'Attribute'; |
|
| 327 | + $method = 'get' . Str::studly($key) . 'Attribute'; |
|
| 328 | 328 | |
| 329 | 329 | return $this->{$method}($model); |
| 330 | 330 | } |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | */ |
| 346 | 346 | public function hasGetAccessor($key) |
| 347 | 347 | { |
| 348 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
| 348 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /** |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | if (($methodBreaker = strpos($key, '.')) !== false) { |
| 391 | 391 | $method = substr($key, 0, $methodBreaker); |
| 392 | 392 | if (method_exists($model, $method)) { |
| 393 | - if (method_exists($model->$method, $submethod = str_replace($method.'.', '', $key))) { |
|
| 393 | + if (method_exists($model->$method, $submethod = str_replace($method . '.', '', $key))) { |
|
| 394 | 394 | return $model->$method->$submethod(); |
| 395 | 395 | } |
| 396 | 396 | |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | public function setAttribute($key, $value) |
| 415 | 415 | { |
| 416 | 416 | if ($this->hasSetMutator($key)) { |
| 417 | - $method = 'set'.Str::studly($key).'Attribute'; |
|
| 417 | + $method = 'set' . Str::studly($key) . 'Attribute'; |
|
| 418 | 418 | |
| 419 | 419 | return $this->{$method}($value); |
| 420 | 420 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | */ |
| 432 | 432 | public function hasSetMutator($key) |
| 433 | 433 | { |
| 434 | - return method_exists($this, 'set'.Str::studly($key).'Attribute'); |
|
| 434 | + return method_exists($this, 'set' . Str::studly($key) . 'Attribute'); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | /** |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | */ |
| 444 | 444 | public function hasGetMutator($key) |
| 445 | 445 | { |
| 446 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
| 446 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | /** |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace LaravelFlare\Flare\Admin; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Arr; |
|
| 6 | 5 | use Illuminate\Support\Str; |
| 7 | 6 | use Illuminate\Routing\Router; |
| 8 | 7 | use LaravelFlare\Flare\Support\ControllerInspector; |
@@ -165,13 +165,13 @@ discard block |
||
| 165 | 165 | // route explicitly for the developers, so reverse routing is possible. |
| 166 | 166 | foreach ($routable as $method => $routes) { |
| 167 | 167 | foreach ($routes as $route) { |
| 168 | - $action = ['uses' => $controller.'@'.$method]; |
|
| 168 | + $action = ['uses' => $controller . '@' . $method]; |
|
| 169 | 169 | |
| 170 | 170 | \Route::{$route['verb']}($route['uri'], $action); |
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - \Route::any($uri.'/{_missing}', $controller.'@missingMethod'); |
|
| 174 | + \Route::any($uri . '/{_missing}', $controller . '@missingMethod'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | return $this->view; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - return 'flare::'.$this->view; |
|
| 244 | + return 'flare::' . $this->view; |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | /** |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | public function getTitle() |
| 323 | 323 | { |
| 324 | 324 | if (!isset($this->title) || !$this->title) { |
| 325 | - return Str::title(str_replace('_', ' ', snake_case(preg_replace('/'.static::CLASS_SUFFIX.'$/', '', static::shortName())))); |
|
| 325 | + return Str::title(str_replace('_', ' ', snake_case(preg_replace('/' . static::CLASS_SUFFIX . '$/', '', static::shortName())))); |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | return $this->title; |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | */ |
| 398 | 398 | public function relativeUrl($path = '') |
| 399 | 399 | { |
| 400 | - return \Flare::relativeAdminUrl($this->urlPrefix().($path ? '/'.$path : '')); |
|
| 400 | + return \Flare::relativeAdminUrl($this->urlPrefix() . ($path ? '/' . $path : '')); |
|
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | /** |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | */ |
| 422 | 422 | public function relativeCurrentUrl($path) |
| 423 | 423 | { |
| 424 | - return \Route::current() ? \Route::current()->getPrefix().'/'.$path : null; |
|
| 424 | + return \Route::current() ? \Route::current()->getPrefix() . '/' . $path : null; |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /* |
@@ -10,7 +10,6 @@ |
||
| 10 | 10 | use Illuminate\Foundation\Bus\DispatchesJobs; |
| 11 | 11 | use Illuminate\Foundation\Auth\ResetsPasswords; |
| 12 | 12 | use LaravelFlare\Flare\Permissions\Permissions; |
| 13 | -use Illuminate\Foundation\Auth\ThrottlesLogins; |
|
| 14 | 13 | use Illuminate\Foundation\Auth\AuthenticatesUsers; |
| 15 | 14 | use LaravelFlare\Flare\Http\Controllers\FlareController; |
| 16 | 15 | use LaravelFlare\Flare\Admin\Widgets\WidgetAdminManager; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * Log the user. |
| 86 | 86 | * |
| 87 | - * @return \Illuminate\Http\RedirectReponse |
|
| 87 | + * @return \Illuminate\Http\RedirectResponse |
|
| 88 | 88 | */ |
| 89 | 89 | public function getLogout() |
| 90 | 90 | { |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * panel. If they do no, they will be sent |
| 122 | 122 | * to the homepage of the website. |
| 123 | 123 | * |
| 124 | - * @return \Illuminate\Http\RedirectReponse |
|
| 124 | + * @return \Illuminate\Http\RedirectResponse |
|
| 125 | 125 | */ |
| 126 | 126 | protected function loginRedirect() |
| 127 | 127 | { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $view = 'admin.dashboard'; |
| 56 | 56 | |
| 57 | 57 | if (!view()->exists($view)) { |
| 58 | - $view = 'flare::'.$view; |
|
| 58 | + $view = 'flare::' . $view; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | return view($view, ['widgets' => (new WidgetAdminManager())]); |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | /** |
| 30 | 30 | * Register any application authentication / authorization services. |
| 31 | 31 | * |
| 32 | - * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
|
| 33 | 32 | */ |
| 34 | 33 | public function boot() |
| 35 | 34 | { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | // If the routable method is an index method, we will create a special index |
| 49 | 49 | // route which is simply the prefix and the verb and does not contain any |
| 50 | 50 | // the wildcard place-holders that each "typical" routes would contain. |
| 51 | - if ($data['plain'] == $prefix.'/index') { |
|
| 51 | + if ($data['plain'] == $prefix . '/index') { |
|
| 52 | 52 | $routable[$method->name][] = $this->getIndexData($data, $prefix); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function getPlainUri($name, $prefix) |
| 122 | 122 | { |
| 123 | - return $prefix.'/'.implode('-', array_slice(explode('_', Str::snake($name)), 1)); |
|
| 123 | + return $prefix . '/' . implode('-', array_slice(explode('_', Str::snake($name)), 1)); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -131,6 +131,6 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function addUriWildcards($uri) |
| 133 | 133 | { |
| 134 | - return $uri.'/{one?}/{two?}/{three?}/{four?}/{five?}'; |
|
| 134 | + return $uri . '/{one?}/{two?}/{three?}/{four?}/{five?}'; |
|
| 135 | 135 | } |
| 136 | 136 | } |
@@ -139,6 +139,7 @@ |
||
| 139 | 139 | /** |
| 140 | 140 | * Performs the Model Query. |
| 141 | 141 | * |
| 142 | + * @param boolean $count |
|
| 142 | 143 | * @return \Illuminate\Database\Eloquent\Collection |
| 143 | 144 | */ |
| 144 | 145 | private function query($count) |