1 | <?php |
||
45 | class ItemList implements ItemListInterface |
||
46 | { |
||
47 | /** |
||
48 | * Items |
||
49 | * |
||
50 | * @var ItemInterface[] |
||
51 | */ |
||
52 | protected $items; |
||
53 | /** |
||
54 | * Internal pointer |
||
55 | * |
||
56 | * @var null |
||
57 | */ |
||
58 | protected $pointer = null; |
||
59 | |||
60 | /** |
||
61 | * ItemList constructor |
||
62 | * |
||
63 | * @param ItemInterface[] $items Items |
||
64 | */ |
||
65 | 1 | public function __construct(array $items = []) |
|
70 | |||
71 | /** |
||
72 | * Return the current item |
||
73 | * |
||
74 | * @return ItemInterface Item |
||
75 | */ |
||
76 | public function current() |
||
80 | |||
81 | /** |
||
82 | * Move forward to next element |
||
83 | * |
||
84 | * @return void |
||
85 | */ |
||
86 | public function next() |
||
90 | |||
91 | /** |
||
92 | * Return the position of the current element |
||
93 | * |
||
94 | * @return mixed Position of the current element |
||
95 | */ |
||
96 | public function key() |
||
100 | |||
101 | /** |
||
102 | * Checks if current position is valid |
||
103 | * |
||
104 | * @return boolean The current position is valid |
||
105 | */ |
||
106 | public function valid() |
||
110 | |||
111 | /** |
||
112 | * Rewind the item list to the first element |
||
113 | * |
||
114 | * @return void |
||
115 | */ |
||
116 | public function rewind() |
||
120 | |||
121 | /** |
||
122 | * Return an object representation of the item list |
||
123 | * |
||
124 | * @return \stdClass Micro information items |
||
125 | * @api |
||
126 | */ |
||
127 | public function toObject() |
||
131 | |||
132 | /** |
||
133 | * Return a JSON representation of the item list |
||
134 | * |
||
135 | * @return string Micro information items |
||
136 | * @api |
||
137 | */ |
||
138 | public function toJson() |
||
142 | |||
143 | /** |
||
144 | * Return all items, optionally of particular types |
||
145 | * |
||
146 | * @param array ...$types Item types |
||
147 | * @return ItemListInterface Items matching the requested types |
||
148 | * @api |
||
149 | */ |
||
150 | public function items(...$types) |
||
154 | |||
155 | /** |
||
156 | * Return the first item, optionally of particular types |
||
157 | * |
||
158 | * @param array ...$types Item types |
||
159 | * @return ItemInterface Item |
||
160 | * @api |
||
161 | */ |
||
162 | public function item(...$types) |
||
166 | } |
||
167 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..