@@ -92,15 +92,15 @@ public function removeSubscriber(EventSubscriberInterface $subscriber)
92
92
/**
93
93
* {@inheritdoc}
94
94
*/
95
- public function getListeners (string $ eventName = null )
95
+ public function getListeners (string $ eventName = null ): array
96
96
{
97
97
return $ this ->dispatcher ->getListeners ($ eventName );
98
98
}
99
99
100
100
/**
101
101
* {@inheritdoc}
102
102
*/
103
- public function getListenerPriority (string $ eventName , callable |array $ listener )
103
+ public function getListenerPriority (string $ eventName , callable |array $ listener ): ? int
104
104
{
105
105
// we might have wrapped listeners for the event (if called while dispatching)
106
106
// in that case get the priority by wrapper
@@ -118,7 +118,7 @@ public function getListenerPriority(string $eventName, callable|array $listener)
118
118
/**
119
119
* {@inheritdoc}
120
120
*/
121
- public function hasListeners (string $ eventName = null )
121
+ public function hasListeners (string $ eventName = null ): bool
122
122
{
123
123
return $ this ->dispatcher ->hasListeners ($ eventName );
124
124
}
@@ -163,10 +163,7 @@ public function dispatch(object $event, string $eventName = null): object
163
163
return $ event ;
164
164
}
165
165
166
- /**
167
- * @return array
168
- */
169
- public function getCalledListeners (Request $ request = null )
166
+ public function getCalledListeners (Request $ request = null ): array
170
167
{
171
168
if (null === $ this ->callStack ) {
172
169
return [];
@@ -184,10 +181,7 @@ public function getCalledListeners(Request $request = null)
184
181
return $ called ;
185
182
}
186
183
187
- /**
188
- * @return array
189
- */
190
- public function getNotCalledListeners (Request $ request = null )
184
+ public function getNotCalledListeners (Request $ request = null ): array
191
185
{
192
186
try {
193
187
$ allListeners = $ this ->getListeners ();
@@ -255,10 +249,8 @@ public function reset()
255
249
*
256
250
* @param string $method The method name
257
251
* @param array $arguments The method arguments
258
- *
259
- * @return mixed
260
252
*/
261
- public function __call (string $ method , array $ arguments )
253
+ public function __call (string $ method , array $ arguments ): mixed
262
254
{
263
255
return $ this ->dispatcher ->{$ method }(...$ arguments );
264
256
}
0 commit comments