Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | final class CreateMultiSig implements Command |
||
8 | { |
||
9 | private const METHOD = 'createmultisig'; |
||
10 | private $nRequired; |
||
11 | private $keys; |
||
12 | |||
13 | /** |
||
14 | * CreateMultiSig constructor |
||
15 | * @param int $nRequired |
||
16 | * @param string[] $keys |
||
17 | */ |
||
18 | public function __construct(int $nRequired, array $keys) |
||
19 | { |
||
20 | call_user_func_array(function(string ...$keys) {}, $keys); |
||
|
|||
21 | |||
22 | 2 | if (empty($keys)) { |
|
23 | 1 | throw new \InvalidArgumentException('At least 1 key must be supplied.'); |
|
24 | } |
||
25 | |||
26 | 1 | $this->nRequired = $nRequired; |
|
27 | 1 | $this->keys = $keys; |
|
28 | 1 | } |
|
29 | |||
30 | 1 | public function jsonSerialize(): object |
|
37 | ]; |
||
38 | } |
||
40 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.