Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
90 | public function export() |
||
91 | { |
||
92 | $rpc = [ |
||
93 | 'id' => $this->id, |
||
94 | 'jsonrpc' => self::VERSION, |
||
95 | 'result' => $this->attributes->all() |
||
96 | ]; |
||
97 | |||
98 | if ($this->error instanceof RpcGenericErrorException) { |
||
99 | $rpc['error'] = $this->error; |
||
100 | unset($rpc['result']); |
||
101 | } |
||
102 | |||
103 | return $rpc; |
||
104 | } |
||
105 | } |