@@ -15,12 +15,12 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function handle() |
| 17 | 17 | { |
| 18 | - if (app()->environment() != 'local' && ! $this->option('force')) { |
|
| 18 | + if (app()->environment() != 'local' && !$this->option('force')) { |
|
| 19 | 19 | throw new \Exception('You can only run the seeder in the local environment since this will inject a ton of default data'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | if (app()->environment() != 'local' && $this->option('force')) { |
| 23 | - if (! $this->confirm('You are about to inject default seeding data in the '.app()->environment().' database! Are you sure?')) { |
|
| 23 | + if (!$this->confirm('You are about to inject default seeding data in the '.app()->environment().' database! Are you sure?')) { |
|
| 24 | 24 | $this->info('You are welcome. I have just saved your job.'); |
| 25 | 25 | |
| 26 | 26 | return; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $locales = config('chief.locales'); |
| 26 | 26 | $locale = $this->argument('locale'); |
| 27 | 27 | |
| 28 | - if (! in_array($locale, $locales)) { |
|
| 28 | + if (!in_array($locale, $locales)) { |
|
| 29 | 29 | throw new \InvalidArgumentException('Passed locale '.$locale.' is not found as Chief locale. Available locales are '.implode(',', $locales)); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | return UrlRecord::allOnlineModels($locale) |
| 52 | 52 | // In case the url is not found or present for given locale. |
| 53 | - ->reject(function (Visitable $model) use ($locale) { |
|
| 54 | - return ! $model->url($locale); |
|
| 53 | + ->reject(function(Visitable $model) use ($locale) { |
|
| 54 | + return !$model->url($locale); |
|
| 55 | 55 | }); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $user->enabled = true; |
| 18 | 18 | $user->save(); |
| 19 | 19 | |
| 20 | - $user->assignRole((array) $roles); |
|
| 20 | + $user->assignRole((array)$roles); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $password = $passwordConfirm = null; |
| 31 | 31 | $tries = 0; |
| 32 | 32 | |
| 33 | - while (! $password || strlen($password) < 4 || $password != $passwordConfirm) { |
|
| 33 | + while (!$password || strlen($password) < 4 || $password != $passwordConfirm) { |
|
| 34 | 34 | if ($tries > 2) { |
| 35 | 35 | throw new \Exception('Aborting. Too many failed attempts to set password'); |
| 36 | 36 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | $this->bootFrontendEssentials(); |
| 81 | 81 | |
| 82 | - if (! $this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 82 | + if (!$this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 83 | 83 | return; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -118,11 +118,11 @@ discard block |
||
| 118 | 118 | (new ConsoleServiceProvider($this->app))->register(); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - $this->app->singleton(Registry::class, function () { |
|
| 121 | + $this->app->singleton(Registry::class, function() { |
|
| 122 | 122 | return new Registry([]); |
| 123 | 123 | }); |
| 124 | 124 | |
| 125 | - $this->app->singleton(Settings::class, function () { |
|
| 125 | + $this->app->singleton(Settings::class, function() { |
|
| 126 | 126 | return new Settings; |
| 127 | 127 | }); |
| 128 | 128 | |
@@ -133,12 +133,12 @@ discard block |
||
| 133 | 133 | if ($this->app->make(AdminEnvironment::class)->check(request())) { |
| 134 | 134 | $this->app->when(SettingsController::class) |
| 135 | 135 | ->needs(SettingFields::class) |
| 136 | - ->give(function () { |
|
| 136 | + ->give(function() { |
|
| 137 | 137 | return new SettingFields(new Settings); |
| 138 | 138 | }); |
| 139 | 139 | |
| 140 | 140 | // Global chief nav singleton |
| 141 | - $this->app->singleton(Nav::class, function () { |
|
| 141 | + $this->app->singleton(Nav::class, function() { |
|
| 142 | 142 | return new Nav; |
| 143 | 143 | }); |
| 144 | 144 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | 'role' => \Thinktomorrow\Chief\Admin\Authorization\Role::class, |
| 173 | 173 | ]; |
| 174 | 174 | |
| 175 | - Auth::provider('chief-eloquent', function ($app, array $config) { |
|
| 175 | + Auth::provider('chief-eloquent', function($app, array $config) { |
|
| 176 | 176 | return new ChiefUserProvider($app['hash'], $config['model']); |
| 177 | 177 | }); |
| 178 | 178 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | Relation::morphMap(['chiefuser' => User::class]); |
| 243 | 243 | Relation::morphMap(['menuitem' => MenuItem::class]); |
| 244 | 244 | |
| 245 | - Blade::directive('fragments', function () { |
|
| 245 | + Blade::directive('fragments', function() { |
|
| 246 | 246 | return '<?php echo app(\\Thinktomorrow\\Chief\\Fragments\\FragmentsRenderer::class)->render($model instanceof \Thinktomorrow\Chief\Shared\Concerns\Nestable\Tree\NestedNode ? $model->getModel() : $model, get_defined_vars()); ?>'; |
| 247 | 247 | }); |
| 248 | 248 | } |
@@ -37,19 +37,19 @@ |
||
| 37 | 37 | Blade::component('chief-table::components.data', 'chief::table.data'); |
| 38 | 38 | |
| 39 | 39 | // Chief directives |
| 40 | - Blade::directive('adminRoute', function ($expression) { |
|
| 40 | + Blade::directive('adminRoute', function($expression) { |
|
| 41 | 41 | return "<?php echo \$manager->route({$expression}); ?>"; |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | - Blade::directive('adminCan', function ($expression) { |
|
| 44 | + Blade::directive('adminCan', function($expression) { |
|
| 45 | 45 | return "<?php if (isset(\$manager) && \$manager->can({$expression})) { ?>"; |
| 46 | 46 | }); |
| 47 | 47 | |
| 48 | - Blade::directive('elseAdminCan', function () { |
|
| 48 | + Blade::directive('elseAdminCan', function() { |
|
| 49 | 49 | return '<?php } else { ?>'; |
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | - Blade::directive('endAdminCan', function () { |
|
| 52 | + Blade::directive('endAdminCan', function() { |
|
| 53 | 53 | return '<?php } ?>'; |
| 54 | 54 | }); |
| 55 | 55 | |