| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.2894 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 1 | public function auth(UserAuthDataProvider $authDataProvider): bool |
|
| 43 | { |
||
| 44 | 1 | $login = $this->loginCollection[$authDataProvider->getType()] ?? null; |
|
| 45 | |||
| 46 | 1 | if (!$login) { |
|
| 47 | 1 | throw new UserException( |
|
| 48 | 1 | sprintf( |
|
| 49 | 1 | 'Login type %s not found', |
|
| 50 | 1 | $authDataProvider->getType() |
|
| 51 | ) |
||
| 52 | ); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $login->auth( |
||
| 56 | $authDataProvider, |
||
| 57 | $this->credentialProvider->getCredentialsForType( |
||
| 58 | $authDataProvider->getUser(), |
||
| 59 | $authDataProvider->getType() |
||
| 60 | ) |
||
| 63 | } |