1 | <?php |
||
5 | class ResourceCollection implements \ArrayAccess, \Iterator, \Countable |
||
6 | { |
||
7 | /** @var Resource[] */ |
||
8 | protected $items; |
||
9 | |||
10 | /** |
||
11 | * @param array $resources |
||
12 | */ |
||
13 | public function __construct(array $resources) |
||
18 | |||
19 | /** |
||
20 | * @return Resource[] |
||
21 | */ |
||
22 | public function getItems() |
||
26 | |||
27 | /** {@inheritdoc} */ |
||
28 | public function offsetExists($offset) |
||
32 | |||
33 | /** {@inheritdoc} */ |
||
34 | public function offsetGet($offset) |
||
38 | |||
39 | /** {@inheritdoc} */ |
||
40 | public function offsetSet($offset, $value) |
||
44 | |||
45 | /** {@inheritdoc} */ |
||
46 | public function offsetUnset($offset) |
||
50 | |||
51 | /** |
||
52 | * @return Resource|null |
||
|
|||
53 | */ |
||
54 | public function current() |
||
58 | |||
59 | /** |
||
60 | * @return Resource|null |
||
61 | */ |
||
62 | public function next() |
||
66 | |||
67 | /** {@inheritdoc} */ |
||
68 | public function key() |
||
72 | |||
73 | /** {@inheritdoc} */ |
||
74 | public function valid() |
||
78 | |||
79 | /** {@inheritdoc} */ |
||
80 | public function rewind() |
||
84 | |||
85 | /** @{inheritdoc} */ |
||
86 | public function count() |
||
90 | } |
||
91 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.