Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / event-dispatcher / EventDispatcher.php
index bc79a958da127ba019cc3a7f7defb0f887fbde5c..4e75c63e4fafb4573bf2ed9eef1ec2d50f0b123d 100644 (file)
@@ -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]));
             }
         }
     }