@@ -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 | } |
@@ -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 |