Completed
Push — master ( fb20ac...a802ac )
by Nathan
02:02
created

Help::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace ZenCash\Rpc\Command\Control;
4
5
use ZenCash\Rpc\Command;
6
7
final class Help implements Command
8
{
9
    private const METHOD = 'help';
10
    private $command;
11
12
    public function __construct(string $command)
13
    {
14
        $this->command = $command;
15
    }
16
17
    public function jsonSerialize(): object
18
    {
19
        return (object) [
20
            'jsonrpc' => Command::JSON_RPC_VERSION,
21
            'id'      => Command::ID,
22
            'method'  => self::METHOD,
23
            'params' => [$this->command]
24
        ];
25
    }
26
}
27