| 1 | <?php |
||
| 12 | class FlashListener implements EventSubscriberInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected static $successMessages = [ |
||
| 18 | Events::REGISTRATION_COMPLETED => 'registration.flash.user_created' |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var Session |
||
| 23 | */ |
||
| 24 | protected $session; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var TranslatorInterface |
||
| 28 | */ |
||
| 29 | protected $translator; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Constructor. |
||
| 33 | * |
||
| 34 | * @param Session $session |
||
| 35 | * @param TranslatorInterface $translator |
||
| 36 | */ |
||
| 37 | public function __construct(Session $session, TranslatorInterface $translator) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | public static function getSubscribedEvents() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Adds a success flash message. |
||
| 55 | * |
||
| 56 | * @param Event $event |
||
| 57 | * @param string $eventName |
||
| 58 | */ |
||
| 59 | public function addSuccessFlash(Event $event, $eventName) |
||
| 67 | } |
||
| 68 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.