@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | protected function callCallable(Builder $query, $direction) |
| 54 | 54 | { |
| 55 | - call_user_func_array($this->name, [$query, $direction]); |
|
| 55 | + call_user_func_array($this->name, [ $query, $direction ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -64,20 +64,20 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | parent::initialize(); |
| 66 | 66 | |
| 67 | - $this->buttons->put('edit', $button = new ControlLink(function (Model $model) { |
|
| 67 | + $this->buttons->put('edit', $button = new ControlLink(function(Model $model) { |
|
| 68 | 68 | return $this->getModelConfiguration()->getEditUrl($model->getKey()); |
| 69 | 69 | }, trans('sleeping_owl::lang.table.edit'), 100)); |
| 70 | 70 | $button->hideText(); |
| 71 | - $button->setCondition(function () { |
|
| 71 | + $button->setCondition(function() { |
|
| 72 | 72 | return $this->isEditable(); |
| 73 | 73 | }); |
| 74 | 74 | $button->setIcon('fa fa-pencil'); |
| 75 | 75 | $button->setHtmlAttribute('class', 'btn-primary'); |
| 76 | 76 | |
| 77 | - $this->buttons->put('delete', $button = new ControlButton(function (Model $model) { |
|
| 77 | + $this->buttons->put('delete', $button = new ControlButton(function(Model $model) { |
|
| 78 | 78 | return $this->getModelConfiguration()->getDeleteUrl($model->getKey()); |
| 79 | 79 | }, trans('sleeping_owl::lang.table.delete'), 200)); |
| 80 | - $button->setCondition(function () { |
|
| 80 | + $button->setCondition(function() { |
|
| 81 | 81 | return $this->isDeletable(); |
| 82 | 82 | }); |
| 83 | 83 | |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | $button->setIcon('fa fa-trash'); |
| 87 | 87 | $button->setHtmlAttribute('class', 'btn-danger btn-delete'); |
| 88 | 88 | |
| 89 | - $this->buttons->put('destroy', $button = new ControlButton(function (Model $model) { |
|
| 89 | + $this->buttons->put('destroy', $button = new ControlButton(function(Model $model) { |
|
| 90 | 90 | return $this->getModelConfiguration()->getDestroyUrl($model->getKey()); |
| 91 | 91 | }, trans('sleeping_owl::lang.table.destroy'), 300)); |
| 92 | - $button->setCondition(function () { |
|
| 92 | + $button->setCondition(function() { |
|
| 93 | 93 | return $this->isDestroyable(); |
| 94 | 94 | }); |
| 95 | 95 | |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | $button->setIcon('fa fa-trash'); |
| 99 | 99 | $button->setHtmlAttribute('class', 'btn-danger btn-destroy'); |
| 100 | 100 | |
| 101 | - $this->buttons->put('restore', $button = new ControlButton(function (Model $model) { |
|
| 101 | + $this->buttons->put('restore', $button = new ControlButton(function(Model $model) { |
|
| 102 | 102 | return $this->getModelConfiguration()->getRestoreUrl($model->getKey()); |
| 103 | 103 | }, trans('sleeping_owl::lang.table.restore'), 400)); |
| 104 | - $button->setCondition(function () { |
|
| 104 | + $button->setCondition(function() { |
|
| 105 | 105 | return $this->isRestorable(); |
| 106 | 106 | }); |
| 107 | 107 | $button->hideText(); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | return |
| 190 | 190 | $this->editable |
| 191 | 191 | && |
| 192 | - ! $this->isTrashed() |
|
| 192 | + !$this->isTrashed() |
|
| 193 | 193 | && |
| 194 | 194 | $this->getModelConfiguration()->isEditable( |
| 195 | 195 | $this->getModel() |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | return |
| 207 | 207 | $this->deletable |
| 208 | 208 | && |
| 209 | - ! $this->isTrashed() |
|
| 209 | + !$this->isTrashed() |
|
| 210 | 210 | && |
| 211 | 211 | $this->getModelConfiguration()->isDeletable( |
| 212 | 212 | $this->getModel() |
@@ -266,13 +266,13 @@ discard block |
||
| 266 | 266 | { |
| 267 | 267 | return parent::toArray() + [ |
| 268 | 268 | 'buttons' => $this->buttons |
| 269 | - ->each(function (ControlButtonInterface $button) { |
|
| 269 | + ->each(function(ControlButtonInterface $button) { |
|
| 270 | 270 | $button->setModel($this->getModel()); |
| 271 | 271 | }) |
| 272 | - ->filter(function (ControlButtonInterface $button) { |
|
| 272 | + ->filter(function(ControlButtonInterface $button) { |
|
| 273 | 273 | return $button->isActive(); |
| 274 | 274 | }) |
| 275 | - ->sortBy(function (ControlButtonInterface $button) { |
|
| 275 | + ->sortBy(function(ControlButtonInterface $button) { |
|
| 276 | 276 | return $button->getPosition(); |
| 277 | 277 | }), |
| 278 | 278 | ]; |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | $value = $this->getValue(); |
| 13 | 13 | |
| 14 | - if (! $this->hasClassProperty('label-', 'bg-')) { |
|
| 14 | + if (!$this->hasClassProperty('label-', 'bg-')) { |
|
| 15 | 15 | $this->setHtmlAttribute('class', 'label-primary'); |
| 16 | 16 | } |
| 17 | 17 | |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | $type = strtolower(substr($name, 3)); |
| 32 | 32 | |
| 33 | 33 | if (starts_with($name, 'add') && array_key_exists($type, $this->types)) { |
| 34 | - if (isset($arguments[0])) { |
|
| 35 | - return call_user_func("{$this->types[$type]}::addMessage", $arguments[0]); |
|
| 34 | + if (isset($arguments[ 0 ])) { |
|
| 35 | + return call_user_func("{$this->types[ $type ]}::addMessage", $arguments[ 0 ]); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | throw new InvalidArgumentException("Method [{$name}] expected parameter"); |
@@ -28,16 +28,16 @@ |
||
| 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 | |
| 39 | - $this->call('vendor:publish', ['--tag' => 'config']); |
|
| 40 | - $this->config = new Repository($this->laravel['config']->get('sleeping_owl')); |
|
| 39 | + $this->call('vendor:publish', [ '--tag' => 'config' ]); |
|
| 40 | + $this->config = new Repository($this->laravel[ 'config' ]->get('sleeping_owl')); |
|
| 41 | 41 | |
| 42 | 42 | $this->files = $files; |
| 43 | 43 | |
@@ -16,6 +16,6 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function install() |
| 18 | 18 | { |
| 19 | - $this->command->call('vendor:publish', ['--tag' => 'assets', '--force']); |
|
| 19 | + $this->command->call('vendor:publish', [ '--tag' => 'assets', '--force' ]); |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | protected function getArguments() |
| 83 | 83 | { |
| 84 | 84 | $arguments = parent::getArguments(); |
| 85 | - $arguments[] = ['model', InputArgument::REQUIRED, 'The name of the model class']; |
|
| 85 | + $arguments[ ] = [ 'model', InputArgument::REQUIRED, 'The name of the model class' ]; |
|
| 86 | 86 | |
| 87 | 87 | return $arguments; |
| 88 | 88 | } |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | Installation\CreateSectionServiceProvider::class, |
| 32 | 32 | Installation\CreatePublicDirectory::class, |
| 33 | 33 | ]) |
| 34 | - ->map(function ($installer) { |
|
| 34 | + ->map(function($installer) { |
|
| 35 | 35 | return new $installer($this, $this->config); |
| 36 | 36 | }) |
| 37 | - ->filter(function ($installer) { |
|
| 38 | - return $this->option('force') ? true : ! $installer->installed(); |
|
| 39 | - })->each(function ($installer) { |
|
| 37 | + ->filter(function($installer) { |
|
| 38 | + return $this->option('force') ? true : !$installer->installed(); |
|
| 39 | + })->each(function($installer) { |
|
| 40 | 40 | $installer->install(); |
| 41 | 41 | $installer->showInfo(); |
| 42 | 42 | }); |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | collect([ |
| 25 | 25 | Installation\PublishAssets::class, |
| 26 | 26 | ]) |
| 27 | - ->map(function ($installer) { |
|
| 27 | + ->map(function($installer) { |
|
| 28 | 28 | return new $installer($this, $this->config); |
| 29 | 29 | }) |
| 30 | - ->filter(function ($installer) { |
|
| 31 | - return $this->option('force') ? true : ! $installer->installed(); |
|
| 32 | - })->each(function ($installer) { |
|
| 30 | + ->filter(function($installer) { |
|
| 31 | + return $this->option('force') ? true : !$installer->installed(); |
|
| 32 | + })->each(function($installer) { |
|
| 33 | 33 | $installer->install(); |
| 34 | 34 | $installer->showInfo(); |
| 35 | 35 | }); |