@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | $this->repository = app(RepositoryInterface::class, [$class]); |
| 112 | 112 | |
| 113 | - if (! $this->alias) { |
|
| 113 | + if (!$this->alias) { |
|
| 114 | 114 | $this->setDefaultAlias(); |
| 115 | 115 | } |
| 116 | 116 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | public function can($action, Model $model) |
| 301 | 301 | { |
| 302 | - if (! $this->checkAccess) { |
|
| 302 | + if (!$this->checkAccess) { |
|
| 303 | 303 | return true; |
| 304 | 304 | } |
| 305 | 305 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | */ |
| 332 | 332 | public function hasCustomControllerClass() |
| 333 | 333 | { |
| 334 | - return ! is_null($controller = $this->getControllerClass()) and class_exists($controller); |
|
| 334 | + return !is_null($controller = $this->getControllerClass()) and class_exists($controller); |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /** |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $page->setPriority($priority); |
| 469 | 469 | |
| 470 | 470 | if ($badge) { |
| 471 | - if (! ($badge instanceof BadgeInterface)) { |
|
| 471 | + if (!($badge instanceof BadgeInterface)) { |
|
| 472 | 472 | $badge = new Badge($badge); |
| 473 | 473 | } |
| 474 | 474 | |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | */ |
| 512 | 512 | public function fireEvent($event, $halt = true, Model $model = null, ...$payload) |
| 513 | 513 | { |
| 514 | - if (! isset(self::$dispatcher)) { |
|
| 514 | + if (!isset(self::$dispatcher)) { |
|
| 515 | 515 | return true; |
| 516 | 516 | } |
| 517 | 517 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function isCreatable() |
| 203 | 203 | { |
| 204 | - if (! is_callable($this->getCreate())) { |
|
| 204 | + if (!is_callable($this->getCreate())) { |
|
| 205 | 205 | return false; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | public function isEditable(Model $model) |
| 227 | 227 | { |
| 228 | - if (! is_callable($this->getEdit())) { |
|
| 228 | + if (!is_callable($this->getEdit())) { |
|
| 229 | 229 | return false; |
| 230 | 230 | } |
| 231 | 231 | |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | public function fireDisplay() |
| 349 | 349 | { |
| 350 | - if (! is_callable($this->getDisplay())) { |
|
| 350 | + if (!is_callable($this->getDisplay())) { |
|
| 351 | 351 | return; |
| 352 | 352 | } |
| 353 | 353 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | */ |
| 389 | 389 | public function fireCreate() |
| 390 | 390 | { |
| 391 | - if (! is_callable($this->getCreate())) { |
|
| 391 | + if (!is_callable($this->getCreate())) { |
|
| 392 | 392 | return; |
| 393 | 393 | } |
| 394 | 394 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | */ |
| 436 | 436 | public function fireEdit($id) |
| 437 | 437 | { |
| 438 | - if (! is_callable($this->getEdit())) { |
|
| 438 | + if (!is_callable($this->getEdit())) { |
|
| 439 | 439 | return; |
| 440 | 440 | } |
| 441 | 441 | |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | $repository = $this->getRepository(); |
| 703 | 703 | $item = $repository->find($id); |
| 704 | 704 | |
| 705 | - if (is_null($item) || ! $this->isEditable($item)) { |
|
| 705 | + if (is_null($item) || !$this->isEditable($item)) { |
|
| 706 | 706 | abort(404); |
| 707 | 707 | } |
| 708 | 708 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function setPasswordAttribute($value) |
| 34 | 34 | { |
| 35 | - if (! empty($value)) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $this->attributes['password'] = bcrypt($value); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function setClass($class) |
| 60 | 60 | { |
| 61 | - if (! class_exists($class)) { |
|
| 61 | + if (!class_exists($class)) { |
|
| 62 | 62 | throw new RepositoryException("Class {$class} not found."); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | public function with($with) |
| 107 | 107 | { |
| 108 | - if (! is_array($with)) { |
|
| 108 | + if (!is_array($with)) { |
|
| 109 | 109 | $with = func_get_args(); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | { |
| 215 | 215 | $table = $this->getModel()->getTable(); |
| 216 | 216 | |
| 217 | - $columns = Cache::remember('admin.columns.'.$table, 60, function () use ($table) { |
|
| 217 | + $columns = Cache::remember('admin.columns.'.$table, 60, function() use ($table) { |
|
| 218 | 218 | return Schema::getColumnListing($table); |
| 219 | 219 | }); |
| 220 | 220 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | return; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if (! is_null($userClass::where('email', $email)->first())) { |
|
| 72 | + if (!is_null($userClass::where('email', $email)->first())) { |
|
| 73 | 73 | $this->error("User with same email [{$email}] exists."); |
| 74 | 74 | |
| 75 | 75 | return; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $confirm = $this->confirm("Are you sure want to delete user with id [{$id}]?", false); |
| 123 | - if (! $confirm) { |
|
| 123 | + if (!$confirm) { |
|
| 124 | 124 | return; |
| 125 | 125 | } |
| 126 | 126 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $this->laravel->getNamespace().'Providers\\AdminSectionsServiceProvider' |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | - if (! $provider) { |
|
| 34 | + if (!$provider) { |
|
| 35 | 35 | $this->error('[App\Providers\AdminSectionsServiceProvider] not found'); |
| 36 | 36 | |
| 37 | 37 | return; |
@@ -28,11 +28,11 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function fire(Filesystem $files) |
| 30 | 30 | { |
| 31 | - if (! defined('SLEEPINGOWL_STUB_PATH')) { |
|
| 31 | + if (!defined('SLEEPINGOWL_STUB_PATH')) { |
|
| 32 | 32 | define('SLEEPINGOWL_STUB_PATH', __DIR__.'/stubs'); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if (! $this->confirmToProceed('SleepingOwl Admin')) { |
|
| 35 | + if (!$this->confirmToProceed('SleepingOwl Admin')) { |
|
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | */ |
| 130 | 130 | public function setValidationRules($validationRules) |
| 131 | 131 | { |
| 132 | - if (! is_array($validationRules)) { |
|
| 132 | + if (!is_array($validationRules)) { |
|
| 133 | 133 | $validationRules = func_get_args(); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function save() |
| 10 | 10 | { |
| 11 | 11 | $name = $this->getName(); |
| 12 | - if (! Request::has($name)) { |
|
| 12 | + if (!Request::has($name)) { |
|
| 13 | 13 | Request::merge([$name => 0]); |
| 14 | 14 | } |
| 15 | 15 | |