@@ -27,19 +27,19 @@ |
||
| 27 | 27 | Blade::component('chief::templates.mail.template', 'chief::mail.template'); |
| 28 | 28 | |
| 29 | 29 | // Chief directives |
| 30 | - Blade::directive('adminRoute', function ($expression) { |
|
| 30 | + Blade::directive('adminRoute', function($expression) { |
|
| 31 | 31 | return "<?php echo \$manager->route({$expression}); ?>"; |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | - Blade::directive('adminCan', function ($expression) { |
|
| 34 | + Blade::directive('adminCan', function($expression) { |
|
| 35 | 35 | return "<?php if (isset(\$manager) && \$manager->can({$expression})) { ?>"; |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Blade::directive('elseAdminCan', function () { |
|
| 38 | + Blade::directive('elseAdminCan', function() { |
|
| 39 | 39 | return '<?php } else { ?>'; |
| 40 | 40 | }); |
| 41 | 41 | |
| 42 | - Blade::directive('endAdminCan', function () { |
|
| 42 | + Blade::directive('endAdminCan', function() { |
|
| 43 | 43 | return '<?php } ?>'; |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | $this->bootEssentials(); |
| 95 | 95 | |
| 96 | - if (! $this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 96 | + if (!$this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 97 | 97 | return; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | 'role' => Role::class, |
| 163 | 163 | ]; |
| 164 | 164 | |
| 165 | - Auth::provider('chief-eloquent', function ($app, array $config) { |
|
| 165 | + Auth::provider('chief-eloquent', function($app, array $config) { |
|
| 166 | 166 | return new ChiefUserProvider($app['hash'], $config['model']); |
| 167 | 167 | }); |
| 168 | 168 | } |
@@ -226,11 +226,11 @@ discard block |
||
| 226 | 226 | (new ConsoleServiceProvider($this->app))->register(); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - $this->app->singleton(Registry::class, function () { |
|
| 229 | + $this->app->singleton(Registry::class, function() { |
|
| 230 | 230 | return new Registry([]); |
| 231 | 231 | }); |
| 232 | 232 | |
| 233 | - $this->app->singleton(Settings::class, function () { |
|
| 233 | + $this->app->singleton(Settings::class, function() { |
|
| 234 | 234 | return new Settings; |
| 235 | 235 | }); |
| 236 | 236 | |
@@ -245,13 +245,13 @@ discard block |
||
| 245 | 245 | if ($this->app->make(AdminEnvironment::class)->check(request())) { |
| 246 | 246 | $this->app->when(SettingsController::class) |
| 247 | 247 | ->needs(SettingFields::class) |
| 248 | - ->give(function () { |
|
| 248 | + ->give(function() { |
|
| 249 | 249 | return new SettingFields(new Settings); |
| 250 | 250 | }); |
| 251 | 251 | Relation::morphMap(['chiefuser' => User::class]); |
| 252 | 252 | |
| 253 | 253 | // Global chief nav singleton |
| 254 | - $this->app->singleton(Nav::class, function () { |
|
| 254 | + $this->app->singleton(Nav::class, function() { |
|
| 255 | 255 | return new Nav; |
| 256 | 256 | }); |
| 257 | 257 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $models = $class::withoutGlobalScopes()->get(); |
| 27 | 27 | |
| 28 | - $models->each(function ($model) use ($fieldKey) { |
|
| 28 | + $models->each(function($model) use ($fieldKey) { |
|
| 29 | 29 | $this->localizeRepeatField($model, $fieldKey); |
| 30 | 30 | }); |
| 31 | 31 | |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $value = $model->dynamic($fieldKey); |
| 39 | 39 | |
| 40 | - if (! isset($value)) { |
|
| 40 | + if (!isset($value)) { |
|
| 41 | 41 | $this->warn('Model ['.$model::class.' '.$model->id.'] does not have a ['.$fieldKey.'] field.'); |
| 42 | 42 | |
| 43 | 43 | return; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! is_array($value) || empty($value)) { |
|
| 46 | + if (!is_array($value) || empty($value)) { |
|
| 47 | 47 | $this->warn('Model ['.$model::class.' '.$model->id.'] does not have a ['.$fieldKey.'] field that is an array.'); |
| 48 | 48 | |
| 49 | 49 | return; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $keys = array_keys($value); |
| 53 | 53 | |
| 54 | - if (! is_int($keys[0])) { |
|
| 54 | + if (!is_int($keys[0])) { |
|
| 55 | 55 | $this->info('Model ['.$model::class.' '.$model->id.'] is already a converted ['.$fieldKey.'] field.'); |
| 56 | 56 | |
| 57 | 57 | return; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $entry = []; |
| 88 | 88 | |
| 89 | 89 | foreach ($item as $property => $translations) { |
| 90 | - if (! is_array($translations)) { |
|
| 90 | + if (!is_array($translations)) { |
|
| 91 | 91 | $entry[$property] = $translations; |
| 92 | 92 | |
| 93 | 93 | continue; |