mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-09 14:46:46 +02:00
Readability updates
Fixes docblock, minor formatting tweak for readbility, and adds a new docblock for getSlackData record.
This commit is contained in:
@@ -85,8 +85,16 @@ class SlackRecord
|
|||||||
*/
|
*/
|
||||||
private $normalizerFormatter;
|
private $normalizerFormatter;
|
||||||
|
|
||||||
public function __construct(?string $channel = null, ?string $username = null, bool $useAttachment = true, ?string $userIcon = null, bool $useShortAttachment = false, bool $includeContextAndExtra = false, array $excludeFields = array(), FormatterInterface $formatter = null)
|
public function __construct(
|
||||||
{
|
?string $channel = null,
|
||||||
|
?string $username = null,
|
||||||
|
bool $useAttachment = true,
|
||||||
|
?string $userIcon = null,
|
||||||
|
bool $useShortAttachment = false,
|
||||||
|
bool $includeContextAndExtra = false,
|
||||||
|
array $excludeFields = array(),
|
||||||
|
FormatterInterface $formatter = null
|
||||||
|
) {
|
||||||
$this->channel = $channel;
|
$this->channel = $channel;
|
||||||
$this->username = $username;
|
$this->username = $username;
|
||||||
$this->userIcon = $userIcon !== null ? trim($userIcon, ':') : null;
|
$this->userIcon = $userIcon !== null ? trim($userIcon, ':') : null;
|
||||||
@@ -101,6 +109,10 @@ class SlackRecord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns required data in format that Slack
|
||||||
|
* is expecting.
|
||||||
|
*/
|
||||||
public function getSlackData(array $record): array
|
public function getSlackData(array $record): array
|
||||||
{
|
{
|
||||||
$dataArray = array();
|
$dataArray = array();
|
||||||
@@ -175,7 +187,7 @@ class SlackRecord
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returned a Slack message attachment color associated with
|
* Returns a Slack message attachment color associated with
|
||||||
* provided level.
|
* provided level.
|
||||||
*/
|
*/
|
||||||
public function getAttachmentColor(int $level): string
|
public function getAttachmentColor(int $level): string
|
||||||
|
Reference in New Issue
Block a user