// test: complex generic reflection collection chain resolves through extends and implements
// feature: completion
// Adapted from phpactor generics/gh-1800.test
// expect: argMethod(
---
<?php
interface ReflectionArgument {
public function argMethod(): void;
}
/**
* @template T
* @extends \IteratorAggregate<T>
*/
interface ReflectionCollection extends \IteratorAggregate {}
/**
* @template T
* @implements ReflectionCollection<T>
*/
abstract class AbstractReflectionCollection implements ReflectionCollection {}
/**
* @extends AbstractReflectionCollection<ReflectionArgument>
*/
class ReflectionArgumentCollection extends AbstractReflectionCollection {}
class ReflectionNodeArgumentExpression {
public function arguments(): ReflectionArgumentCollection {}
}
function test(ReflectionNodeArgumentExpression $foo): void {
foreach ($foo->arguments() as $bar) {
$bar-><>
}
}