Hi,
It seems the Generator type is not correctly implemented with: Generator<TKey, TValue, TSend, TReturn>
<?php
declare(strict_types=1);
namespace Devsense\Common\Generator;
use Generator;
class MyClass
{
/**
* @return Generator<int, string, mixed, void>
*/
public function loop(): Generator
{
yield 'testA';
yield 'testB';
}
}
$a = new MyClass();
foreach($a->loop() as $b) {
/**
* @trace $b
*/
var_dump(is_string($b));
}
Thank you for the fix.
Regards,