From f85f6db7c00a43ae45d963d089458477cf3e44b3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 24 Apr 2017 08:18:06 -0500 Subject: [PATCH] formatting --- src/Illuminate/Auth/CreatesUserProviders.php | 23 ++++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Illuminate/Auth/CreatesUserProviders.php b/src/Illuminate/Auth/CreatesUserProviders.php index 72eca2160b46..10ba6b70b841 100644 --- a/src/Illuminate/Auth/CreatesUserProviders.php +++ b/src/Illuminate/Auth/CreatesUserProviders.php @@ -27,9 +27,8 @@ public function createUserProvider($provider = null) $provider = $provider ?: $this->getDefaultUserProvider(); $config = $this->app['config']['auth.providers.'.$provider]; - $driver = Arr::get($config, 'driver'); - if (isset($this->customProviderCreators[$driver])) { + if (isset($this->customProviderCreators[$driver = Arr::get($config, 'driver')])) { return call_user_func( $this->customProviderCreators[$driver], $this->app, $config ); @@ -45,16 +44,6 @@ public function createUserProvider($provider = null) } } - /** - * Get the default user provider name. - * - * @return string - */ - public function getDefaultUserProvider() - { - return $this->app['config']['auth.defaults.provider']; - } - /** * Create an instance of the database user provider. * @@ -78,4 +67,14 @@ protected function createEloquentProvider($config) { return new EloquentUserProvider($this->app['hash'], $config['model']); } + + /** + * Get the default user provider name. + * + * @return string + */ + public function getDefaultUserProvider() + { + return $this->app['config']['auth.defaults.provider']; + } }