Conditions | 5 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
30 | 4 | public function jsonSerialize(): object |
|
31 | { |
||
32 | return (object) [ |
||
33 | 4 | 'jsonrpc' => Command::JSON_RPC_VERSION, |
|
34 | 'id' => Command::ID, |
||
35 | 4 | 'method' => self::METHOD, |
|
36 | 4 | 'params' => array_merge( |
|
37 | [ |
||
38 | 4 | $this->address, $this->amount |
|
39 | ], |
||
40 | 4 | !is_null($this->comment) ? [ $this->comment ] : [ ], |
|
41 | 4 | !is_null($this->comment) && !is_null($this->commentTo) ? [ $this->commentTo ] : [ ], |
|
42 | 4 | $this->subtractFromAmount !== false ? [ $this->subtractFromAmount ] : [ ] |
|
43 | ) |
||
47 |