| 1 | <?php |
||
| 7 | class SlackClient |
||
| 8 | { |
||
| 9 | protected $curl; |
||
| 10 | protected $webhookUrl; |
||
| 11 | protected $channels = []; |
||
| 12 | protected $iconUrl = null; |
||
| 13 | protected $username = null; |
||
| 14 | |||
| 15 | public function __construct(Curl $curl, $webhookUrl, $channels = [], $username = 'Deployment Notifier', $iconUrl = null) |
||
| 23 | |||
| 24 | public function sendMessage($message) |
||
| 35 | |||
| 36 | public function getPayload($message, $channel) |
||
| 50 | } |
||
| 51 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: