for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pageon\SlackWebhookMonolog\Slack;
use Pageon\SlackWebhookMonolog\Slack\Interfaces\IconInterface;
use Pageon\SlackWebhookMonolog\Slack\Interfaces\UserInterface;
use Pageon\SlackWebhookMonolog\Slack\Interfaces\UsernameInterface;
/**
* @author Jelmer Prins <[email protected]>
*
* @since 0.1.0
*/
class User implements UserInterface
{
* @var UsernameInterface|null
private $username = null;
* @var IconInterface|null
private $icon = null;
* Setting a custom Username or Icon is not required.
* If they are not provided slack will fallback to the default settings from the configuration in slack.
* @param UsernameInterface|null $username
* @param IconInterface|null $icon
public function __construct(UsernameInterface $username = null, IconInterface $icon = null)
$this->username = $username;
$this->icon = $icon;
}
* {@inheritdoc}
public function getUsername()
return $this->username;
public function hasUsername()
return $this->username !== null;
public function getIcon()
return $this->icon;
public function hasIcon()
return $this->icon !== null;