Skip to content

Commit 4c51712

Browse files
committed
Logger PHPStan fix
1 parent 2dc45a7 commit 4c51712

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Codeception/Module/Symfony/EventsAssertionsTrait.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function dontSeeEvent(array|string|null $expected = null): void
4747
* $I->dontSeeEventListenerIsCalled('App\MyEventListener', ['my.event', 'my.other.event']);
4848
* ```
4949
*
50-
* @param class-string|object|list<class-string|object> $expected Listener(s) (class-string or instance) that must **not** be called.
51-
* @param string|list<string> $events Event name(s) to scope the assertion to; empty array means “any event”.
50+
* @param class-string|object|list<class-string|object> $expected Listeners (class-strings or object instances).
51+
* @param string|list<string> $events Event name(s) (empty = any).
5252
*/
5353
public function dontSeeEventListenerIsCalled(array|object|string $expected, array|string $events = []): void
5454
{
@@ -193,11 +193,10 @@ protected function getDispatchedEvents(): array
193193
protected function getOrphanedEvents(): array
194194
{
195195
$eventCollector = $this->grabEventCollector(__FUNCTION__);
196-
$orphaned = $eventCollector->getOrphanedEvents($this->getDefaultDispatcher());
197-
$raw = $orphaned instanceof Data ? $orphaned->getValue(true) : $orphaned;
196+
$orphanedEvents = $eventCollector->getOrphanedEvents($this->getDefaultDispatcher());
198197

199198
/** @var list<string> $events */
200-
$events = is_array($raw) ? array_values($raw) : [];
199+
$events = is_array($orphanedEvents) ? array_values($orphanedEvents) : $orphanedEvents->getValue(true);
201200
return $events;
202201
}
203202

0 commit comments

Comments
 (0)