X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fevent-dispatcher%2FEventDispatcher.php;fp=vendor%2Fsymfony%2Fevent-dispatcher%2FEventDispatcher.php;h=4e75c63e4fafb4573bf2ed9eef1ec2d50f0b123d;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=bc79a958da127ba019cc3a7f7defb0f887fbde5c;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index bc79a958d..4e75c63e4 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -82,13 +82,13 @@ class EventDispatcher implements EventDispatcherInterface return; } - if (is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { + if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } foreach ($this->listeners[$eventName] as $priority => $listeners) { foreach ($listeners as $k => $v) { - if ($v !== $listener && is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { + if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); $this->listeners[$eventName][$priority][$k] = $v; } @@ -135,13 +135,13 @@ class EventDispatcher implements EventDispatcherInterface return; } - if (is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { + if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } foreach ($this->listeners[$eventName] as $priority => $listeners) { foreach ($listeners as $k => $v) { - if ($v !== $listener && is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { + if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); } if ($v === $listener) { @@ -165,9 +165,9 @@ class EventDispatcher implements EventDispatcherInterface public function addSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (is_string($params)) { + if (\is_string($params)) { $this->addListener($eventName, array($subscriber, $params)); - } elseif (is_string($params[0])) { + } elseif (\is_string($params[0])) { $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0); } else { foreach ($params as $listener) { @@ -183,12 +183,12 @@ class EventDispatcher implements EventDispatcherInterface public function removeSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (is_array($params) && is_array($params[0])) { + if (\is_array($params) && \is_array($params[0])) { foreach ($params as $listener) { $this->removeListener($eventName, array($subscriber, $listener[0])); } } else { - $this->removeListener($eventName, array($subscriber, is_string($params) ? $params : $params[0])); + $this->removeListener($eventName, array($subscriber, \is_string($params) ? $params : $params[0])); } } }