Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 4 | private function handle() |
|
32 | { |
||
33 | 4 | $this->errors = collect(); |
|
34 | |||
35 | 4 | if (! config('ghost.debug.enabled')) { |
|
36 | 1 | return $this->errors->push((object) [ |
|
37 | 1 | 'message' => config('ghost.debug.default_error_message'), |
|
38 | 1 | ]); |
|
39 | } |
||
40 | |||
41 | 3 | $responseErrors = data_get($this->response->json(), 'errors', []); |
|
42 | |||
43 | 3 | foreach ($responseErrors as $error) { |
|
44 | 3 | $this->errors->push((object) $error); |
|
45 | } |
||
48 |