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