// test: generic interface extending Traversable resolves template in foreach
// feature: completion
// Adapted from phpactor generics/interface.test
// expect: getCode(
---
<?php
class Violation {
public function getCode(): string {}
}
/**
* @extends \ArrayAccess<int, Violation>
* @extends \Traversable<int, Violation>
*/
interface ViolationListInterface extends \Traversable, \Countable, \ArrayAccess
{
}
function foo(ViolationListInterface $list) {
foreach ($list as $violation) {
$violation-><>
}
}