Total Complexity | 11 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class ListSinceBlock implements Command |
||
8 | { |
||
9 | private const METHOD = 'listsinceblock'; |
||
10 | private $hash; |
||
11 | private $confirms; |
||
12 | private $watchOnly; |
||
13 | |||
14 | 4 | public function __construct(?string $blockHash, ?int $targetConfirmations, ?bool $includeWatchOnly) |
|
19 | 4 | } |
|
20 | |||
21 | 4 | public function jsonSerialize(): object |
|
22 | { |
||
23 | return (object) [ |
||
24 | 4 | 'jsonrpc' => Command::JSON_RPC_VERSION, |
|
25 | 'id' => Command::ID, |
||
26 | 4 | 'method' => self::METHOD, |
|
27 | 4 | 'params' => array_merge( |
|
28 | 4 | $this->getHashParam(), |
|
29 | 4 | $this->getConfirmsParam(), |
|
30 | 4 | $this->getWatchOnlyParam() |
|
31 | ) |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | 4 | private function getHashParam(): array |
|
38 | } |
||
39 | |||
40 | 4 | private function getConfirmsParam(): array |
|
43 | } |
||
44 | |||
45 | 4 | private function getWatchOnlyParam(): array |
|
52 |