Skip to content

Commit fd249c1

Browse files
committed
Fix PHPStan error
1 parent 7b8a6a0 commit fd249c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SleeperHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public function processNotifications() : void{
103103
while(true){
104104
$notifierIds = $this->sharedObject->synchronized(function() : array{
105105
$notifierIds = [];
106+
//phpstan can't understand ThreadSafeArray generics because ThreadSafe implements
107+
//IteratorAggregate<mixed, mixed>, so we need to force the issue here
108+
/** @var int $notifierId */
106109
foreach($this->sharedObject as $notifierId => $_){
107110
$notifierIds[$notifierId] = $notifierId;
108111
unset($this->sharedObject[$notifierId]);

0 commit comments

Comments
 (0)