1 | <?php |
||
14 | class Multisig implements ScriptInfoInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $m; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $n; |
||
25 | |||
26 | /** |
||
27 | * @var ScriptInterface |
||
28 | */ |
||
29 | private $script; |
||
30 | |||
31 | /** |
||
32 | * @var PublicKeyInterface[] |
||
33 | */ |
||
34 | private $keys = []; |
||
35 | |||
36 | /** |
||
37 | * @param ScriptInterface $script |
||
38 | */ |
||
39 | 66 | public function __construct(ScriptInterface $script) |
|
69 | |||
70 | /** |
||
71 | * @return int |
||
72 | */ |
||
73 | 36 | public function getRequiredSigCount() |
|
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | */ |
||
81 | 30 | public function getKeyCount() |
|
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | 36 | public function classification() |
|
93 | |||
94 | /** |
||
95 | * @param PublicKeyInterface $publicKey |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function checkInvolvesKey(PublicKeyInterface $publicKey) |
||
109 | |||
110 | /** |
||
111 | * @return \BitWasp\Bitcoin\Crypto\EcAdapter\Key\PublicKeyInterface[] |
||
112 | */ |
||
113 | 66 | public function getKeys() |
|
117 | |||
118 | /** |
||
119 | * @param TransactionSignatureInterface[] $signatures |
||
120 | * @param PublicKeyInterface[] $publicKeys |
||
121 | * @return Script|ScriptInterface |
||
122 | */ |
||
123 | 18 | public function makeScriptSig(array $signatures = [], array $publicKeys = []) |
|
137 | } |
||
138 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.