summaryrefslogtreecommitdiff
path: root/vendor/symfony/event-dispatcher/Debug
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-02-03 13:44:03 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-02-04 11:17:33 +0000
commit7def76c7d817a9ec81e9ae4a03a850514b1a2e1c (patch)
tree3fcf7e8236356daac44f7c17b8c0c5bc736a0926 /vendor/symfony/event-dispatcher/Debug
parentadfb3656b8dac8505590490f4f8aaf4bea27881b (diff)
downloadwebtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.gz
webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.bz2
webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.zip
Working on upgrade wizard and testing
Diffstat (limited to 'vendor/symfony/event-dispatcher/Debug')
-rw-r--r--vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php22
-rw-r--r--vendor/symfony/event-dispatcher/Debug/WrappedListener.php4
2 files changed, 13 insertions, 13 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()) {
diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
index 6acaa38ef8..5c9249de28 100644
--- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
+++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
@@ -94,12 +94,12 @@ class WrappedListener
$this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()';
}
- return array(
+ return [
'event' => $eventName,
'priority' => null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null,
'pretty' => $this->pretty,
'stub' => $this->stub,
- );
+ ];
}
public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher)