| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.512 |
| Changes | 5 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 30 | 2 | public function send($notifiable, Notification $notification) |
|
| 31 | { |
||
| 32 | 2 | $twitterMessage = $notification->toTwitter($notifiable); |
|
|
|
|||
| 33 | 2 | if ($twitterMessage->getReceiver() != null) { |
|
| 34 | $response = $this->twitter->post('direct_messages/new', [ |
||
| 35 | 'text' => $twitterMessage->getContent(), |
||
| 36 | 'screen_name' => $twitterMessage->getReceiver(), |
||
| 37 | ]); |
||
| 38 | } else { |
||
| 39 | 2 | $response = $this->twitter->post( |
|
| 40 | 2 | 'statuses/update', ['status' => $twitterMessage->getContent()]); |
|
| 41 | } |
||
| 42 | |||
| 43 | 2 | if ($response->getHttpCode() !== 200) { |
|
| 44 | 1 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); |
|
| 45 | } |
||
| 46 | 1 | } |
|
| 47 | } |
||
| 48 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.