1 | <?php |
||
15 | trait ContainerAwareTrait { |
||
16 | /** |
||
17 | * Dependency injection container. |
||
18 | * |
||
19 | * @var \Symfony\Component\DependencyInjection\ContainerInterface |
||
20 | */ |
||
21 | protected $container; |
||
22 | |||
23 | /** |
||
24 | * Set the dependency injection container. |
||
25 | * |
||
26 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container |
||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | public function setContainer(ContainerInterface $container=null) { |
||
33 | } |
||
34 |
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.