Total Complexity | 4 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class PasswordContainerProvider implements UserProviderInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $password; |
||
25 | |||
26 | public function __construct(string $password) |
||
29 | } |
||
30 | |||
31 | /** * |
||
32 | * @param UserInterface $user |
||
33 | * |
||
34 | * @return UserInterface |
||
35 | */ |
||
36 | public function refreshUser(UserInterface $user) |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Loads the user for the given username. |
||
43 | * |
||
44 | * This method must throw UsernameNotFoundException if the user is not |
||
45 | * found. |
||
46 | * |
||
47 | * @param string $username The username |
||
48 | * |
||
49 | * @throws UsernameNotFoundException if the user is not found |
||
50 | * |
||
51 | * @return UserInterface |
||
52 | */ |
||
53 | public function loadUserByUsername($username) |
||
54 | { |
||
55 | return new PasswordContainer($this->password); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Whether this provider supports the given user class. |
||
60 | * |
||
61 | * @param string $class |
||
62 | * |
||
63 | * @return bool |
||
64 | */ |
||
65 | public function supportsClass($class) |
||
68 | } |
||
69 | } |
||
70 |