1 | <?php |
||
17 | class EntityListenerResolver extends DefaultEntityListenerResolver |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var ServiceLocatorInterface |
||
22 | */ |
||
23 | private $container; |
||
24 | |||
25 | /** |
||
26 | * EntityListenerResolver constructor. |
||
27 | * |
||
28 | * @param ServiceLocatorInterface $container |
||
29 | */ |
||
30 | public function __construct(ServiceLocatorInterface $container) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function resolve($className) |
||
46 | |||
47 | /** |
||
48 | * @return ServiceLocatorInterface |
||
49 | */ |
||
50 | protected function getContainer() |
||
54 | } |
||
55 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.