1 | <?php |
||
11 | class WitnessCollectionMutator extends MutableCollection |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @param ScriptWitnessInterface[] $inputs |
||
16 | */ |
||
17 | public function __construct(array $inputs) |
||
27 | |||
28 | /** |
||
29 | * @return InputMutator |
||
30 | */ |
||
31 | public function current() |
||
35 | |||
36 | /** |
||
37 | * @param int $offset |
||
38 | * @return InputMutator |
||
39 | */ |
||
40 | public function offsetGet($offset) |
||
48 | |||
49 | /** |
||
50 | * @return TransactionWitnessCollection |
||
51 | */ |
||
52 | public function done() |
||
61 | |||
62 | /** |
||
63 | * @param int|string $start |
||
64 | * @param int|string $length |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function slice($start, $length) |
||
77 | |||
78 | /** |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function null() |
||
86 | |||
87 | /** |
||
88 | * @param ScriptWitnessInterface $witness |
||
89 | * @return $this |
||
90 | */ |
||
91 | public function add(ScriptWitnessInterface $witness) |
||
99 | |||
100 | /** |
||
101 | * @param int $i |
||
102 | * @param ScriptWitnessInterface $input |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function set($i, ScriptWitnessInterface $input) |
||
110 | } |
||
111 |
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: