@@ -290,7 +290,7 @@ |
||
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
| 293 | - * @return null|string |
|
| 293 | + * @return boolean |
|
| 294 | 294 | */ |
| 295 | 295 | public function hasCustomControllerClass() |
| 296 | 296 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | $this->repository = $app->make(RepositoryInterface::class); |
| 116 | 116 | $this->repository->setClass($class); |
| 117 | - if (! $this->alias) { |
|
| 117 | + if (!$this->alias) { |
|
| 118 | 118 | $this->setDefaultAlias(); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | */ |
| 304 | 304 | public function can($action, Model $model) |
| 305 | 305 | { |
| 306 | - if (! $this->checkAccess) { |
|
| 306 | + if (!$this->checkAccess) { |
|
| 307 | 307 | return true; |
| 308 | 308 | } |
| 309 | 309 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | public function hasCustomControllerClass() |
| 337 | 337 | { |
| 338 | - return ! is_null($controller = $this->getControllerClass()) and class_exists($controller); |
|
| 338 | + return !is_null($controller = $this->getControllerClass()) and class_exists($controller); |
|
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | /** |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $page->setPriority($priority); |
| 473 | 473 | |
| 474 | 474 | if ($badge) { |
| 475 | - if (! ($badge instanceof BadgeInterface)) { |
|
| 475 | + if (!($badge instanceof BadgeInterface)) { |
|
| 476 | 476 | $badge = new Badge($badge); |
| 477 | 477 | } |
| 478 | 478 | |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | */ |
| 516 | 516 | public function fireEvent($event, $halt = true, Model $model = null, ...$payload) |
| 517 | 517 | { |
| 518 | - if (! isset(self::$dispatcher)) { |
|
| 518 | + if (!isset(self::$dispatcher)) { |
|
| 519 | 519 | return true; |
| 520 | 520 | } |
| 521 | 521 | |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @param ControlButtonInterface $button |
|
| 125 | + * @param ControlButtonInterface $buttons |
|
| 126 | 126 | * |
| 127 | 127 | * @return $this |
| 128 | 128 | */ |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * @param mixed $distinct |
|
| 121 | + * @param string|null $distinct |
|
| 122 | 122 | * |
| 123 | 123 | * @return $this |
| 124 | 124 | */ |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * Apply offset and limit to the query. |
| 164 | 164 | * |
| 165 | - * @param $query |
|
| 165 | + * @param Builder $query |
|
| 166 | 166 | * @param \Illuminate\Http\Request $request |
| 167 | 167 | */ |
| 168 | 168 | protected function applyOffset($query, \Illuminate\Http\Request $request) |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * Convert collection to the datatables structure. |
| 205 | 205 | * |
| 206 | 206 | * @param \Illuminate\Http\Request $request |
| 207 | - * @param array|Collection $collection |
|
| 207 | + * @param Collection $collection |
|
| 208 | 208 | * @param int $totalCount |
| 209 | 209 | * @param int $filteredCount |
| 210 | 210 | * |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public static function registerRoutes(Router $router) |
| 25 | 25 | { |
| 26 | 26 | $routeName = 'admin.display.async'; |
| 27 | - if (! $router->has($routeName)) { |
|
| 27 | + if (!$router->has($routeName)) { |
|
| 28 | 28 | $router->get('{adminModel}/async/{adminDisplayName?}', [ |
| 29 | 29 | 'as' => $routeName, |
| 30 | 30 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\DisplayController@async', |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $routeName = 'admin.display.async.inlineEdit'; |
| 35 | - if (! $router->has($routeName)) { |
|
| 35 | + if (!$router->has($routeName)) { |
|
| 36 | 36 | $router->post('{adminModel}/async/{adminDisplayName?}', [ |
| 37 | 37 | 'as' => $routeName, |
| 38 | 38 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\AdminController@inlineEdit', |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $totalCount = $query->count(); |
| 143 | 143 | $filteredCount = 0; |
| 144 | 144 | |
| 145 | - if (! is_null($this->distinct)) { |
|
| 145 | + if (!is_null($this->distinct)) { |
|
| 146 | 146 | $filteredCount = $query->distinct()->count($this->getDistinct()); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | return; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - $query->where(function ($query) use ($search) { |
|
| 193 | + $query->where(function($query) use ($search) { |
|
| 194 | 194 | $columns = $this->getColumns()->all(); |
| 195 | 195 | foreach ($columns as $column) { |
| 196 | 196 | if (in_array(get_class($column), $this->searchableColumns)) { |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | /** |
| 46 | 46 | * @param ActionInterface $actions |
| 47 | 47 | * |
| 48 | - * @return $this |
|
| 48 | + * @return \SleepingOwl\Admin\Contracts\Display\DisplayInterface |
|
| 49 | 49 | */ |
| 50 | 50 | public function set($actions) |
| 51 | 51 | { |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | * @param ModelConfigurationInterface $model |
| 312 | 312 | * @param Request $request |
| 313 | 313 | * |
| 314 | - * @return bool |
|
| 314 | + * @return boolean|null |
|
| 315 | 315 | * |
| 316 | 316 | * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException |
| 317 | 317 | */ |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | /** |
| 535 | 535 | * @param Request $request |
| 536 | 536 | * |
| 537 | - * @return null|string |
|
| 537 | + * @return string |
|
| 538 | 538 | */ |
| 539 | 539 | protected function getBackUrl(Request $request) |
| 540 | 540 | { |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * @return Manager |
|
| 57 | + * @return Breadcrumbs |
|
| 58 | 58 | */ |
| 59 | 59 | public function breadcrumbs() |
| 60 | 60 | { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | list($name, $params) = $this->currentRoute->get(); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - if (! $this->exists($name)) { |
|
| 37 | + if (!$this->exists($name)) { |
|
| 38 | 38 | return ''; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function renderIfExistsArray($name, $params = []) |
| 62 | 62 | { |
| 63 | - if (! $this->exists($name)) { |
|
| 63 | + if (!$this->exists($name)) { |
|
| 64 | 64 | return ''; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function __construct($label = null, Closure $callback = null) |
| 33 | 33 | { |
| 34 | 34 | parent::__construct($label); |
| 35 | - if (! is_null($callback)) { |
|
| 35 | + if (!is_null($callback)) { |
|
| 36 | 36 | $this->setCallback($callback); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function getModelValue() |
| 68 | 68 | { |
| 69 | - if (! is_callable($callback = $this->getCallback())) { |
|
| 69 | + if (!is_callable($callback = $this->getCallback())) { |
|
| 70 | 70 | throw new \Exception('Invalid custom column callback'); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function setOrderable($orderable = true) |
| 75 | 75 | { |
| 76 | - if ($orderable !== false && ! $orderable instanceof OrderByClauseInterface) { |
|
| 77 | - if (! is_string($orderable) && ! $orderable instanceof Closure) { |
|
| 76 | + if ($orderable !== false && !$orderable instanceof OrderByClauseInterface) { |
|
| 77 | + if (!is_string($orderable) && !$orderable instanceof Closure) { |
|
| 78 | 78 | $orderable = $this->getName(); |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -113,11 +113,11 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | if ($instance instanceof Collection) { |
| 115 | 115 | $instance = $instance->pluck($part); |
| 116 | - } elseif (! is_null($instance)) { |
|
| 116 | + } elseif (!is_null($instance)) { |
|
| 117 | 117 | $instance = $instance->getAttribute($part); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if (! empty($parts) && ! is_null($instance)) { |
|
| 120 | + if (!empty($parts) && !is_null($instance)) { |
|
| 121 | 121 | return $this->getValueFromObject($instance, implode('.', $parts)); |
| 122 | 122 | } |
| 123 | 123 | |