1 | <?php |
||
24 | class RoleProvider implements ContextProvider |
||
25 | { |
||
26 | /** |
||
27 | * @var SecurityContextInterface|null |
||
28 | */ |
||
29 | private $context; |
||
30 | |||
31 | /** |
||
32 | * Create the role provider with a security context. |
||
33 | * |
||
34 | * The security context is optional to not fail on routes that have no |
||
35 | * firewall. It is however not valid to call updateUserContext when not in |
||
36 | * a firewall context. |
||
37 | * |
||
38 | * @param SecurityContextInterface|TokenStorageInterface $context |
||
|
|||
39 | */ |
||
40 | 18 | public function __construct($context = null) |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | * |
||
57 | * @throws InvalidConfigurationException when called without a security context being set |
||
58 | */ |
||
59 | 3 | public function updateUserContext(UserContext $context) |
|
78 | } |
||
79 |
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.