1 | <?php |
||
2 | |||
3 | namespace ZenCash\Rpc\Command\Wallet; |
||
4 | |||
5 | use ZenCash\Rpc\Command; |
||
6 | |||
7 | final class LockUnspent implements Command |
||
8 | { |
||
9 | private const METHOD = 'lockunspent'; |
||
10 | private $unlock; |
||
11 | private $transactions; |
||
12 | |||
13 | /** |
||
14 | * @param bool $unlock |
||
15 | * @param Transaction[] $transactions |
||
16 | */ |
||
17 | public function __construct(bool $unlock, array $transactions) |
||
18 | { |
||
19 | call_user_func_array(function (Transaction ...$t) {}, $transactions); |
||
0 ignored issues
–
show
|
|||
20 | |||
21 | 2 | $this->unlock = $unlock; |
|
22 | 2 | $this->transactions = $transactions; |
|
23 | 2 | } |
|
24 | |||
25 | 2 | public function jsonSerialize(): object |
|
26 | { |
||
27 | return (object) [ |
||
28 | 2 | 'jsonrpc' => Command::JSON_RPC_VERSION, |
|
29 | 'id' => Command::ID, |
||
30 | 2 | 'method' => self::METHOD, |
|
31 | 2 | 'params' => [ $this->unlock, $this->transactions ] |
|
32 | ]; |
||
33 | } |
||
34 | } |
||
35 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.