1 | <?php |
||
15 | class FlashNoticeListener implements EventSubscriberInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var Session |
||
19 | */ |
||
20 | protected $session; |
||
21 | /** |
||
22 | * @var Translator |
||
23 | */ |
||
24 | protected $translator; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected static $successMessages = [ |
||
30 | WebPageDomainEvents::WEBPAGE_DOMAIN_CREATED => 'black_page.flash.success.created', |
||
31 | WebPageDomainEvents::WEBPAGE_DOMAIN_DEPUBLISHED => 'black_page.flash.success.depublished', |
||
32 | WebPageDomainEvents::WEBPAGE_DOMAIN_PUBLISHED => 'black_page.flash.success.published', |
||
33 | WebPageDomainEvents::WEBPAGE_DOMAIN_REMOVED => 'black_page.flash.success.removed', |
||
34 | WebPageDomainEvents::WEBPAGE_DOMAIN_WRITE => 'black_page.flash.success.write', |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * @param Session $session |
||
39 | * @param TranslatorInterface $translator |
||
40 | */ |
||
41 | public function __construct(Session $session, TranslatorInterface $translator) |
||
46 | |||
47 | /** |
||
48 | * @return array |
||
49 | */ |
||
50 | public static function getSubscribedEvents() |
||
60 | |||
61 | /** |
||
62 | * @param Event $event |
||
63 | */ |
||
64 | public function addSuccessFlash(Event $event) |
||
71 | |||
72 | /** |
||
73 | * @param $message |
||
74 | * @param array $params |
||
75 | * @return string |
||
76 | */ |
||
77 | private function trans($message, array $params = array()) |
||
81 | } |
||
82 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..