1 | <?php |
||
17 | class ResponseCreationListener implements EventSubscriberInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var TranslatorInterface |
||
21 | */ |
||
22 | private $translator; |
||
23 | |||
24 | /** |
||
25 | * @var ClassMetadata |
||
26 | */ |
||
27 | private $metadata; |
||
28 | |||
29 | /** |
||
30 | * Constructor. |
||
31 | * |
||
32 | * @param TranslatorInterface $translator |
||
33 | * @param ClassMetadata $classMetadata |
||
34 | */ |
||
35 | public function __construct(TranslatorInterface $translator, ClassMetadata $classMetadata) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public static function getSubscribedEvents() |
||
50 | |||
51 | /** |
||
52 | * Assembles the response. |
||
53 | * |
||
54 | * @param AssembleResponseEvent $event |
||
55 | */ |
||
56 | public function onResponseCreation(AssembleResponseEvent $event) |
||
71 | } |
||
72 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.