1 | <?php |
||
13 | class TupleSet extends SetAbstract |
||
14 | { |
||
15 | protected $arrayList; |
||
16 | |||
17 | /** |
||
18 | * Construct a TupleSet from an array |
||
19 | * Each key=>value pair will become a Tuple<key, value> |
||
20 | * @param unknown $array |
||
21 | */ |
||
22 | public function __construct($array) |
||
30 | |||
31 | /** |
||
32 | * Ensures that this collection contains the specified element (optional operation). |
||
33 | * @param multitype $element |
||
34 | * @return boolean |
||
35 | */ |
||
36 | public function add($element) |
||
53 | |||
54 | /** |
||
55 | * Removes all of the elements from this collection (optional operation). |
||
56 | */ |
||
57 | public function clear() |
||
61 | |||
62 | /** |
||
63 | * Returns an iterator over the elements in this collection. |
||
64 | * @return IteratorInterface |
||
65 | */ |
||
66 | public function iterator() |
||
70 | |||
71 | /** |
||
72 | * Removes a single instance of the specified element from this collection, if it is present (optional operation). |
||
73 | * @param boolean $changed |
||
74 | */ |
||
75 | public function remove($tuple) |
||
90 | |||
91 | /** |
||
92 | * Returns the number of elements in this collection. |
||
93 | */ |
||
94 | public function size() |
||
98 | |||
99 | /** |
||
100 | * Returns an array containing all of the elements in this collection. |
||
101 | */ |
||
102 | public function toArray() |
||
106 | } |
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: