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