minor #20185 Remove unused variable (lin-lu)

This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #20185).

Discussion
----------

Remove unused variable

Remove unused variable $key.

Commits
-------

129694f Remove unused variable
This commit is contained in:
Fabien Potencier 2016-10-12 18:42:27 -07:00
commit eac27275b1

View File

@ -92,7 +92,7 @@ class EventDispatcher implements EventDispatcherInterface
}
foreach ($this->listeners[$eventName] as $priority => $listeners) {
if (false !== ($key = array_search($listener, $listeners, true))) {
if (false !== array_search($listener, $listeners, true)) {
return $priority;
}
}