@@ -53,7 +53,7 @@ public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $sto
53
53
/**
54
54
* {@inheritdoc}
55
55
*/
56
- public function addListener ($ eventName , $ listener , $ priority = 0 )
56
+ public function addListener (string $ eventName , $ listener , int $ priority = 0 )
57
57
{
58
58
$ this ->dispatcher ->addListener ($ eventName , $ listener , $ priority );
59
59
}
@@ -69,7 +69,7 @@ public function addSubscriber(EventSubscriberInterface $subscriber)
69
69
/**
70
70
* {@inheritdoc}
71
71
*/
72
- public function removeListener ($ eventName , $ listener )
72
+ public function removeListener (string $ eventName , $ listener )
73
73
{
74
74
if (isset ($ this ->wrappedListeners [$ eventName ])) {
75
75
foreach ($ this ->wrappedListeners [$ eventName ] as $ index => $ wrappedListener ) {
@@ -95,15 +95,15 @@ public function removeSubscriber(EventSubscriberInterface $subscriber)
95
95
/**
96
96
* {@inheritdoc}
97
97
*/
98
- public function getListeners ($ eventName = null )
98
+ public function getListeners (string $ eventName = null )
99
99
{
100
100
return $ this ->dispatcher ->getListeners ($ eventName );
101
101
}
102
102
103
103
/**
104
104
* {@inheritdoc}
105
105
*/
106
- public function getListenerPriority ($ eventName , $ listener )
106
+ public function getListenerPriority (string $ eventName , $ listener )
107
107
{
108
108
// we might have wrapped listeners for the event (if called while dispatching)
109
109
// in that case get the priority by wrapper
@@ -121,7 +121,7 @@ public function getListenerPriority($eventName, $listener)
121
121
/**
122
122
* {@inheritdoc}
123
123
*/
124
- public function hasListeners ($ eventName = null )
124
+ public function hasListeners (string $ eventName = null )
125
125
{
126
126
return $ this ->dispatcher ->hasListeners ($ eventName );
127
127
}
@@ -272,7 +272,7 @@ public function reset()
272
272
*
273
273
* @return mixed
274
274
*/
275
- public function __call ($ method , $ arguments )
275
+ public function __call (string $ method , array $ arguments )
276
276
{
277
277
return $ this ->dispatcher ->{$ method }(...$ arguments );
278
278
}
@@ -291,7 +291,7 @@ protected function afterDispatch(string $eventName, object $event)
291
291
{
292
292
}
293
293
294
- private function preProcess ($ eventName )
294
+ private function preProcess (string $ eventName ): void
295
295
{
296
296
if (!$ this ->dispatcher ->hasListeners ($ eventName )) {
297
297
$ this ->orphanedEvents [$ this ->currentRequestHash ][] = $ eventName ;
@@ -309,7 +309,7 @@ private function preProcess($eventName)
309
309
}
310
310
}
311
311
312
- private function postProcess ($ eventName )
312
+ private function postProcess (string $ eventName ): void
313
313
{
314
314
unset($ this ->wrappedListeners [$ eventName ]);
315
315
$ skipped = false ;
0 commit comments