| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4.0092 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 3 | public function send($notifiable, Notification $notification) |
|
| 34 | { |
||
| 35 | 3 | if (! $routing = collect($notifiable->routeNotificationFor('Trello'))) { |
|
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | 3 | $key = config('services.trello.key'); |
|
| 40 | |||
| 41 | 3 | if (is_null($key)) { |
|
| 42 | 1 | throw InvalidConfiguration::configurationNotSet(); |
|
| 43 | } |
||
| 44 | |||
| 45 | 2 | $trelloParameters = $notification->toTrello($notifiable)->toArray(); |
|
|
|
|||
| 46 | |||
| 47 | 2 | $response = $this->client->post(self::API_ENDPOINT.'?key='.$key.'&token='.$routing->get('token'), [ |
|
| 48 | 2 | 'form_params' => Arr::set($trelloParameters, 'idList', $routing->get('idList')), |
|
| 49 | ]); |
||
| 50 | |||
| 51 | 2 | if ($response->getStatusCode() !== 200) { |
|
| 52 | 1 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); |
|
| 53 | } |
||
| 54 | 1 | } |
|
| 55 | } |
||
| 56 |
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.