Skip to content

Commit

Permalink
Merge pull request #6 from imanghafoori1/analysis-XZ7bjD
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI

[ci skip] [skip ci]
  • Loading branch information
imanghafoori1 authored Dec 23, 2018
2 parents ad34fed + 2a4293f commit 624934a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/AnyPassDatabaseUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class AnyPassDatabaseUserProvider extends DatabaseUserProvider
/**
* Overrides the parent method to skip real password validation and assume the password is just correct.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
*
* @return bool
*/
public function validateCredentials(UserContract $user, array $credentials)
Expand Down
5 changes: 3 additions & 2 deletions src/AnyPassEloquentUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class AnyPassEloquentUserProvider extends LaravelUserProvider
/**
* Overrides the parent method to skip real password validation and assume the password is just correct.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
*
* @return bool
*/
public function validateCredentials(UserContract $user, array $credentials)
Expand Down
4 changes: 2 additions & 2 deletions src/AnyPassServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function boot()
public function register()
{
\Auth::provider('eloquentAnyPass', function ($app, array $config) {
return new AnyPassEloquentUserProvider($app['hash'], $config["model"]);
return new AnyPassEloquentUserProvider($app['hash'], $config['model']);
});

\Auth::provider('databaseAnyPass', function ($app, array $config) {
Expand All @@ -48,7 +48,7 @@ private function properConfig()
private function changeUsersDriver()
{
$driver = config()->get('auth.providers.users.driver');
if (in_array($driver, ['eloquent', 'database',])) {
if (in_array($driver, ['eloquent', 'database'])) {
config()->set('auth.providers.users.driver', $driver.'AnyPass');
}
}
Expand Down

0 comments on commit 624934a

Please sign in to comment.