1 | <?php |
||
17 | class Signer |
||
18 | { |
||
19 | /** |
||
20 | * @var EcAdapterInterface |
||
21 | */ |
||
22 | private $ecAdapter; |
||
23 | |||
24 | /** |
||
25 | * @var TransactionInterface |
||
26 | */ |
||
27 | private $tx; |
||
28 | |||
29 | /** |
||
30 | * @var TransactionSignatureSerializer |
||
31 | */ |
||
32 | private $sigSerializer; |
||
33 | |||
34 | /** |
||
35 | * @var PublicKeySerializerInterface |
||
36 | */ |
||
37 | private $pubKeySerializer; |
||
38 | |||
39 | /** |
||
40 | * @var InputSigner[] |
||
41 | */ |
||
42 | private $signatureCreator = []; |
||
43 | |||
44 | /** |
||
45 | * TxWitnessSigner constructor. |
||
46 | * @param TransactionInterface $tx |
||
47 | * @param EcAdapterInterface $ecAdapter |
||
48 | */ |
||
49 | 58 | public function __construct(TransactionInterface $tx, EcAdapterInterface $ecAdapter = null) |
|
56 | |||
57 | /** |
||
58 | * @param int $nIn |
||
59 | * @param PrivateKeyInterface $key |
||
60 | * @param TransactionOutputInterface $txOut |
||
61 | * @param SignData $signData |
||
62 | * @param int $sigHashType |
||
63 | * @return $this |
||
64 | */ |
||
65 | 50 | public function sign($nIn, PrivateKeyInterface $key, TransactionOutputInterface $txOut, SignData $signData = null, $sigHashType = SigHash::ALL) |
|
73 | |||
74 | /** |
||
75 | * @param int $nIn |
||
76 | * @param TransactionOutputInterface $txOut |
||
77 | * @param SignData $signData |
||
78 | * @return InputSigner |
||
79 | */ |
||
80 | 58 | public function input($nIn, TransactionOutputInterface $txOut, SignData $signData = null) |
|
92 | |||
93 | /** |
||
94 | * @return TransactionInterface |
||
95 | */ |
||
96 | 50 | public function get() |
|
113 | } |
||
114 |
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: