Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function post(Notification $notification) |
||
29 | { |
||
30 | $notificationApi = $this->doPost('/post', $notification->toArray()); |
||
31 | |||
32 | if (200 !== $notificationApi->getResponse()->getStatusCode() |
||
33 | && 201 !== $notificationApi->getResponse()->getStatusCode()) { |
||
34 | throw new ApiException('cannot send notification', $this->getRequest(), $this->getResponse()); |
||
35 | } |
||
36 | |||
37 | return true; |
||
38 | } |
||
39 | } |
||
40 |