1 | <?php |
||
13 | class ExceptionListener implements EventSubscriberInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $handledContentTypes; |
||
19 | |||
20 | /** |
||
21 | * @var ContentTypeMatcher |
||
22 | */ |
||
23 | private $contentTypeMatcher; |
||
24 | |||
25 | /** |
||
26 | * @var ExceptionTransformer |
||
27 | */ |
||
28 | private $exceptionTransformer; |
||
29 | |||
30 | /** |
||
31 | * @param ContentTypeMatcher $matcher |
||
32 | * @param ExceptionTransformer $exceptionTransformer |
||
33 | * @param array $handledContentTypes |
||
34 | */ |
||
35 | 4 | public function __construct( |
|
44 | |||
45 | /** |
||
46 | * @param GetResponseForExceptionEvent $event |
||
47 | */ |
||
48 | 4 | public function onKernelException(GetResponseForExceptionEvent $event) |
|
63 | |||
64 | 2 | public static function getSubscribedEvents() |
|
68 | } |
||
69 |
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.