@@ -26,7 +26,7 @@ |
||
| 26 | 26 | public function handle(): void |
| 27 | 27 | { |
| 28 | 28 | // CSV should consist of: locale - redirect url - target -url |
| 29 | - $this->loop($this->argument('file'), function ($row) { |
|
| 29 | + $this->loop($this->argument('file'), function($row) { |
|
| 30 | 30 | try { |
| 31 | 31 | $this->addRedirect->handle($row[0], $row[1], $row[2]); |
| 32 | 32 | } catch (UrlRecordNotFound $e) { |
@@ -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 | } |
@@ -31,19 +31,19 @@ |
||
| 31 | 31 | Blade::component('chief::templates.page.multisite-template', 'chief::page.multisite-template'); |
| 32 | 32 | |
| 33 | 33 | // Chief directives |
| 34 | - Blade::directive('adminRoute', function ($expression) { |
|
| 34 | + Blade::directive('adminRoute', function($expression) { |
|
| 35 | 35 | return "<?php echo \$manager->route({$expression}); ?>"; |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Blade::directive('adminCan', function ($expression) { |
|
| 38 | + Blade::directive('adminCan', function($expression) { |
|
| 39 | 39 | return "<?php if (isset(\$manager) && \$manager->can({$expression})) { ?>"; |
| 40 | 40 | }); |
| 41 | 41 | |
| 42 | - Blade::directive('elseAdminCan', function () { |
|
| 42 | + Blade::directive('elseAdminCan', function() { |
|
| 43 | 43 | return '<?php } else { ?>'; |
| 44 | 44 | }); |
| 45 | 45 | |
| 46 | - Blade::directive('endAdminCan', function () { |
|
| 46 | + Blade::directive('endAdminCan', function() { |
|
| 47 | 47 | return '<?php } ?>'; |
| 48 | 48 | }); |
| 49 | 49 | |