for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Shieldon package.
*
* (c) Terry L. <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Shieldon\Firewall\Panel\Messenger;
use Shieldon\Messenger\Messenger\MessengerInterface;
use Shieldon\Messenger\Slack;
/**
* The get for Slack.
class ItemSlack
{
* Initialize and get the instance.
* @param array $setting The configuration of that messanger.
* @return MessengerInterface
public static function get(array $setting): MessengerInterface
$botToken = $setting['config']['bot_token'] ?? '';
$channel = $setting['config']['channel'] ?? '';
return new Slack($botToken, $channel);
}