The expression return key($this->items) could return the type null|string which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
50
}
51
52
/**
53
* @return bool
54
*/
55
public function valid(): bool
56
{
57
return key($this->items) !== null;
58
}
59
60
/**
61
* @return void
62
*/
63
public function rewind(): void
64
{
65
reset($this->items);
66
}
67
68
/**
69
* @return int
70
*/
71
public function count(): int
72
{
73
return count($this->items);
74
}
75
76
/**
77
* @return Identifier
78
*/
79
public function reverseItems(): Identifier
80
{
81
if (!($this->reverseItems instanceof Identifier)) {