diff options
Diffstat (limited to 'vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php')
| -rw-r--r-- | vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index d421941fc2..513d87c7e8 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -39,8 +39,8 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher = $dispatcher; $this->stopwatch = $stopwatch; $this->logger = $logger; - $this->wrappedListeners = array(); - $this->orphanedEvents = array(); + $this->wrappedListeners = []; + $this->orphanedEvents = []; } /** @@ -164,10 +164,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface public function getCalledListeners() { if (null === $this->callStack) { - return array(); + return []; } - $called = array(); + $called = []; foreach ($this->callStack as $listener) { list($eventName) = $this->callStack->getInfo(); @@ -186,14 +186,14 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $allListeners = $this->getListeners(); } catch (\Exception $e) { if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', array('exception' => $e)); + $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); } // unable to retrieve the uncalled listeners - return array(); + return []; } - $notCalled = array(); + $notCalled = []; foreach ($allListeners as $eventName => $listeners) { foreach ($listeners as $listener) { $called = false; @@ -216,7 +216,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } } - uasort($notCalled, array($this, 'sortNotCalledListeners')); + uasort($notCalled, [$this, 'sortNotCalledListeners']); return $notCalled; } @@ -229,7 +229,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface public function reset() { $this->callStack = null; - $this->orphanedEvents = array(); + $this->orphanedEvents = []; } /** @@ -279,7 +279,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->wrappedListeners[$eventName][] = $wrappedListener; $this->dispatcher->removeListener($eventName, $listener); $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, array($eventName)); + $this->callStack->attach($wrappedListener, [$eventName]); } } @@ -297,7 +297,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); if (null !== $this->logger) { - $context = array('event' => $eventName, 'listener' => $listener->getPretty()); + $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; } if ($listener->wasCalled()) { |
