1 | <?php |
||
15 | class AccessTokenService implements AccessTokenServiceInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var AccessTokenRepositoryInterface |
||
19 | */ |
||
20 | private $accessTokenRepository; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $accessTokenClass; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $defaultExpirationDuration = '+1 month'; |
||
31 | |||
32 | /** |
||
33 | * @var AuthenticationProviderInterface |
||
34 | */ |
||
35 | private $authenticationManager; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $authenticationProviderKey; |
||
41 | |||
42 | 12 | public function __construct( |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 4 | public function findByToken(string $token): ?AccessToken |
|
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 2 | public function createAccessToken(string $username, string $password): AccessToken |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function findUserByToken(string $token): ?UserInterface |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | 2 | public function listByUser(UserInterface $user): array |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 2 | public function createAccessTokenForUser(UserInterface $user): AccessToken |
|
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function cleanUpExpiredTokens(): int |
||
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | 2 | public function remove(AccessToken $accessToken) |
|
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getDefaultExpirationDuration() |
||
135 | |||
136 | /** |
||
137 | * @param string $defaultExpirationDuration |
||
138 | */ |
||
139 | public function setDefaultExpirationDuration($defaultExpirationDuration) |
||
143 | } |
||
144 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.