Skip to content

Commit 9efb161

Browse files
Use ??= more
1 parent 7e0b66a commit 9efb161

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ public function dispatch(object $event, string $eventName = null): object
110110
{
111111
$eventName ??= $event::class;
112112

113-
if (null === $this->callStack) {
114-
$this->callStack = new \SplObjectStorage();
115-
}
113+
$this->callStack ??= new \SplObjectStorage();
116114

117115
$currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
118116

0 commit comments

Comments
 (0)