summaryrefslogtreecommitdiff
path: root/vendor/symfony/event-dispatcher/EventDispatcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/event-dispatcher/EventDispatcher.php')
-rw-r--r--vendor/symfony/event-dispatcher/EventDispatcher.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php
index bc79a958da..4e75c63e4f 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]));
}
}
}