1 | <?php |
||
13 | class Multisig implements ScriptInfoInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | private $m; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $n; |
||
24 | |||
25 | /** |
||
26 | * @var ScriptInterface |
||
27 | */ |
||
28 | private $script; |
||
29 | |||
30 | /** |
||
31 | * @var PublicKeyInterface[] |
||
32 | */ |
||
33 | private $keys = []; |
||
34 | |||
35 | /** |
||
36 | * @param ScriptInterface $script |
||
37 | */ |
||
38 | 42 | public function __construct(ScriptInterface $script) |
|
68 | |||
69 | /** |
||
70 | * @return int |
||
71 | */ |
||
72 | 12 | public function getRequiredSigCount() |
|
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | 6 | public function getKeyCount() |
|
84 | |||
85 | /** |
||
86 | * @return string |
||
87 | */ |
||
88 | 36 | public function classification() |
|
92 | |||
93 | /** |
||
94 | * @param PublicKeyInterface $publicKey |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function checkInvolvesKey(PublicKeyInterface $publicKey) |
||
108 | |||
109 | /** |
||
110 | * @return \BitWasp\Bitcoin\Crypto\EcAdapter\Key\PublicKeyInterface[] |
||
111 | */ |
||
112 | 42 | public function getKeys() |
|
116 | |||
117 | /** |
||
118 | * @param array $signatures |
||
119 | * @param array $publicKeys |
||
120 | * @return Script|ScriptInterface |
||
121 | */ |
||
122 | 18 | public function makeScriptSig(array $signatures = [], array $publicKeys = []) |
|
131 | } |
||
132 |
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.