1 | <?php |
||
23 | class RoleProvider implements ContextProvider |
||
24 | { |
||
25 | /** |
||
26 | * @var TokenStorageInterface|null |
||
27 | */ |
||
28 | private $tokenStorage; |
||
29 | |||
30 | /** |
||
31 | * Create the role provider with a security context. |
||
32 | * |
||
33 | * The token storage is optional to not fail on routes that have no |
||
34 | * firewall. It is however not valid to call updateUserContext when not in |
||
35 | * a firewall context. |
||
36 | * |
||
37 | * @param TokenStorageInterface $tokenStorage |
||
|
|||
38 | */ |
||
39 | 24 | public function __construct(TokenStorageInterface $tokenStorage = null) |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | * |
||
47 | * @throws InvalidConfigurationException when called without a security context being set |
||
48 | */ |
||
49 | 5 | public function updateUserContext(UserContext $context) |
|
68 | } |
||
69 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.