Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php interface AInterface { /** @param list<string> $items */ public function a(array $items): void; } class A implements AInterface { public function a(array $items): void { // ... } } class B { public function __construct( /** @var iterable<string> */ private readonly iterable $items, ) { } public function b(): void { $a = new A(); $a->a(iterator_to_array($this->items)); } }
Snippet created on June 5 2024 at 13:49 UTC
Settings
Get link