Skip to content

Commit cf57788

Browse files
committed
Fix quotes in exception messages
1 parent 4ad8e14 commit cf57788

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function dispatch($event/*, string $eventName = null*/)
151151
$eventName = $swap;
152152

153153
if (!$event instanceof Event) {
154-
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event)));
154+
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of "%s", "%s" given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event)));
155155
}
156156
}
157157

EventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function dispatch($event/*, string $eventName = null*/)
6060
$event = $eventName ?? new Event();
6161
$eventName = $swap;
6262
} else {
63-
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, %s given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
63+
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
6464
}
6565

6666
if (null !== $this->optimized && null !== $eventName) {

LegacyEventDispatcherProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function dispatch($event/*, string $eventName = null*/)
6565
$event = $eventName ?? new Event();
6666
$eventName = $swap;
6767
} else {
68-
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, %s given.', ContractsEventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
68+
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', ContractsEventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
6969
}
7070

7171
$listeners = $this->getListeners($eventName);

0 commit comments

Comments
 (0)