Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 24, 2017
1 parent fc4b7b9 commit f85f6db
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/Illuminate/Auth/CreatesUserProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand All @@ -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.
*
Expand All @@ -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'];
}
}

0 comments on commit f85f6db

Please sign in to comment.