for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace EricMakesStuff\ServerMonitor\Notifications\Senders;
use Illuminate\Contracts\Config\Repository;
use Maknz\Slack\Client;
use EricMakesStuff\ServerMonitor\Notifications\BaseSender;
class Slack extends BaseSender
{
/** @var \Maknz\Slack\Client */
protected $client;
/** @var array */
protected $config;
/**
* @param \Maknz\Slack\Client $client
* @param Repository $config
*/
public function __construct(Client $client, Repository $config)
$this->config = $config->get('server-monitor.notifications.slack');
$config->get('server-mon...r.notifications.slack')
*
array
$config
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
$client->setDefaultUsername($this->config['username']);
$client->setDefaultIcon($this->config['icon']);
$this->client = $client;
}
public function send()
$this->client
->to($this->config['channel'])
->attach([
'text' => $this->message,
'color' => $this->type === static::TYPE_SUCCESS ? 'good' : 'warning',
])
->send($this->subject);
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..