Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
11 | 1 | public static function serviceRespondsNotSuccessful($response) |
|
12 | { |
||
13 | 1 | if (isset($response->error)){ |
|
14 | return new static("Couldn't post notification. Response: ".$response->error); |
||
15 | } |
||
16 | |||
17 | 1 | $responseBody = print_r($response->errors[0]->message, true); |
|
18 | |||
19 | 1 | return new static("Couldn't post notification. Response: ".$responseBody); |
|
20 | } |
||
21 | |||
42 |