Fixed some phpstan errors
This commit is contained in:
@@ -46,11 +46,19 @@ class ConnectionGroup implements EventEmitterInterface, IteratorAggregate, Count
|
||||
return count($this->connections);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return \Traversable<int,WebSocketInterface>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
return new ArrayIterator($this->connections);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return WebSocketInterface[]
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
return $this->connections;
|
||||
@@ -70,6 +78,10 @@ class ConnectionGroup implements EventEmitterInterface, IteratorAggregate, Count
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function closeAll(string $reason, int $code=1001)
|
||||
{
|
||||
foreach ($this->connections as $connection) {
|
||||
|
Reference in New Issue
Block a user