Conditions | 4 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
25 | 4 | public function jsonSerialize(): object |
|
26 | { |
||
27 | return (object) [ |
||
28 | 4 | 'jsonrpc' => Command::JSON_RPC_VERSION, |
|
29 | 'id' => Command::ID, |
||
30 | 4 | 'method' => self::METHOD, |
|
31 | 4 | 'params' => array_merge( |
|
32 | 4 | [ $this->ip, (string) $this->command ], |
|
33 | 4 | !is_null($this->banTime) ? [ $this->banTime ] : [ ], |
|
34 | 4 | !is_null($this->absolute) && !is_null($this->banTime) ? [ $this->absolute ] : [ ] |
|
35 | ) |
||
39 |