1 | <?php |
||
36 | class Roster extends Component implements \IteratorAggregate |
||
37 | { |
||
38 | use BetterEmitter, Accessors; |
||
39 | |||
40 | private $_items = []; |
||
41 | |||
42 | 3 | public function setClient(XmppClient $client) |
|
61 | |||
62 | 2 | private function handleSet(Iq\Query\Roster $query) |
|
74 | |||
75 | 2 | private function handleResult(Iq\Query\Roster $query) |
|
84 | |||
85 | /** |
||
86 | * Whether a offset exists |
||
87 | * @link http://php.net/manual/en/arrayaccess.offsetexists.php |
||
88 | * @param mixed $offset <p> |
||
89 | * An offset to check for. |
||
90 | * </p> |
||
91 | * @return boolean true on success or false on failure. |
||
92 | * </p> |
||
93 | * <p> |
||
94 | * The return value will be casted to boolean if non-boolean was returned. |
||
95 | * @since 5.0.0 |
||
96 | */ |
||
97 | public function offsetExists($offset) |
||
101 | |||
102 | /** |
||
103 | * Offset to retrieve |
||
104 | * @link http://php.net/manual/en/arrayaccess.offsetget.php |
||
105 | * @param mixed $offset <p> |
||
106 | * The offset to retrieve. |
||
107 | * </p> |
||
108 | * @return mixed Can return all value types. |
||
109 | * @since 5.0.0 |
||
110 | */ |
||
111 | public function offsetGet($offset) |
||
115 | |||
116 | /** |
||
117 | * Offset to set |
||
118 | * @link http://php.net/manual/en/arrayaccess.offsetset.php |
||
119 | * @param mixed $offset <p> |
||
120 | * The offset to assign the value to. |
||
121 | * </p> |
||
122 | * @param mixed $value <p> |
||
123 | * The value to set. |
||
124 | * </p> |
||
125 | * @return void |
||
126 | * @since 5.0.0 |
||
127 | */ |
||
128 | public function offsetSet($offset, $value) |
||
132 | |||
133 | /** |
||
134 | * Offset to unset |
||
135 | * @link http://php.net/manual/en/arrayaccess.offsetunset.php |
||
136 | * @param mixed $offset <p> |
||
137 | * The offset to unset. |
||
138 | * </p> |
||
139 | * @return void |
||
140 | * @since 5.0.0 |
||
141 | */ |
||
142 | public function offsetUnset($offset) |
||
146 | |||
147 | 1 | public function remove($what) |
|
160 | |||
161 | /** |
||
162 | * Retrieve an external iterator |
||
163 | * @link http://php.net/manual/en/iteratoraggregate.getiterator.php |
||
164 | * @return Traversable An instance of an object implementing <b>Iterator</b> or |
||
165 | * <b>Traversable</b> |
||
166 | * @since 5.0.0 |
||
167 | */ |
||
168 | public function getIterator(): Traversable |
||
172 | |||
173 | /** |
||
174 | * @return Iq\Query\Roster\Item[] |
||
175 | */ |
||
176 | 1 | public function getItems() |
|
180 | |||
181 | public static function group($name) |
||
185 | |||
186 | /** |
||
187 | * @param callable(Item $item) $mapper |
||
188 | * @return array |
||
189 | */ |
||
190 | public function map(callable $mapper) |
||
194 | |||
195 | /** |
||
196 | * @param callable $predicate |
||
197 | * @return Iq\Query\Roster\Item[] |
||
198 | */ |
||
199 | public function filter(callable $predicate) |
||
203 | |||
204 | public function asArray() : array |
||
208 | |||
209 | public static function fromArray(array $array) |
||
213 | |||
214 | /** |
||
215 | * Count elements of an object |
||
216 | * @link http://php.net/manual/en/countable.count.php |
||
217 | * @return int The custom count as an integer. |
||
218 | * </p> |
||
219 | * <p> |
||
220 | * The return value is cast to an integer. |
||
221 | * @since 5.1.0 |
||
222 | */ |
||
223 | public function count() |
||
227 | |||
228 | |||
229 | 2 | private function setItem(Iq\Query\Roster\Item $item) |
|
234 | |||
235 | private function removeItem(Jid $jid) |
||
247 | } |
||
248 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: