| Conditions | 7 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | !is_null($this->hash) ? [ $this->hash ] : [ ], |
|
| 29 | 4 | !is_null($this->hash) && !is_null($this->confirms) ? [ $this->confirms ] : [ ], |
|
| 30 | 4 | !is_null($this->hash) && !is_null($this->confirms) && !is_null($this->watchOnly) ? [ |
|
| 31 | 1 | $this->watchOnly |
|
| 32 | 4 | ] : [ ] |
|
| 33 | ) |
||
| 37 |