composer update
This commit is contained in:
@@ -140,7 +140,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
|
||||
}
|
||||
|
||||
$currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
|
||||
$eventName = 1 < \func_num_args() ? \func_get_arg(1) : null;
|
||||
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
|
||||
|
||||
if (\is_object($event)) {
|
||||
$eventName = $eventName ?? \get_class($event);
|
||||
@@ -193,7 +193,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
$hash = 1 <= \func_num_args() && null !== ($request = \func_get_arg(0)) ? spl_object_hash($request) : null;
|
||||
$hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null;
|
||||
$called = [];
|
||||
foreach ($this->callStack as $listener) {
|
||||
list($eventName, $requestHash) = $this->callStack->getInfo();
|
||||
@@ -223,23 +223,23 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
$hash = 1 <= \func_num_args() && null !== ($request = \func_get_arg(0)) ? spl_object_hash($request) : null;
|
||||
$hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null;
|
||||
$calledListeners = [];
|
||||
|
||||
if (null !== $this->callStack) {
|
||||
foreach ($this->callStack as $calledListener) {
|
||||
list(, $requestHash) = $this->callStack->getInfo();
|
||||
|
||||
if (null === $hash || $hash === $requestHash) {
|
||||
$calledListeners[] = $calledListener->getWrappedListener();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$notCalled = [];
|
||||
foreach ($allListeners as $eventName => $listeners) {
|
||||
foreach ($listeners as $listener) {
|
||||
$called = false;
|
||||
if (null !== $this->callStack) {
|
||||
foreach ($this->callStack as $calledListener) {
|
||||
list(, $requestHash) = $this->callStack->getInfo();
|
||||
if ((null === $hash || $hash === $requestHash) && $calledListener->getWrappedListener() === $listener) {
|
||||
$called = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$called) {
|
||||
if (!\in_array($listener, $calledListeners, true)) {
|
||||
if (!$listener instanceof WrappedListener) {
|
||||
$listener = new WrappedListener($listener, null, $this->stopwatch, $this);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
|
||||
*/
|
||||
public function getOrphanedEvents(/* Request $request = null */): array
|
||||
{
|
||||
if (1 <= \func_num_args() && null !== $request = \func_get_arg(0)) {
|
||||
if (1 <= \func_num_args() && null !== $request = func_get_arg(0)) {
|
||||
return $this->orphanedEvents[spl_object_hash($request)] ?? [];
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class EventDispatcher implements EventDispatcherInterface
|
||||
*/
|
||||
public function dispatch($event/*, string $eventName = null*/)
|
||||
{
|
||||
$eventName = 1 < \func_num_args() ? \func_get_arg(1) : null;
|
||||
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
|
||||
|
||||
if (\is_object($event)) {
|
||||
$eventName = $eventName ?? \get_class($event);
|
||||
|
||||
@@ -32,9 +32,9 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
|
||||
*/
|
||||
public function dispatch($event/*, string $eventName = null*/)
|
||||
{
|
||||
$eventName = 1 < \func_num_args() ? \func_get_arg(1) : null;
|
||||
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
|
||||
|
||||
if (\is_scalar($event)) {
|
||||
if (is_scalar($event)) {
|
||||
// deprecated
|
||||
$swap = $event;
|
||||
$event = $eventName ?? new Event();
|
||||
|
||||
@@ -53,7 +53,7 @@ final class LegacyEventDispatcherProxy implements EventDispatcherInterface
|
||||
*/
|
||||
public function dispatch($event/*, string $eventName = null*/)
|
||||
{
|
||||
$eventName = 1 < \func_num_args() ? \func_get_arg(1) : null;
|
||||
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
|
||||
|
||||
if (\is_object($event)) {
|
||||
$eventName = $eventName ?? \get_class($event);
|
||||
|
||||
Reference in New Issue
Block a user