From 8b879fe6fae3f83c42c0342b2e4ac6b8be1f6fca Mon Sep 17 00:00:00 2001 From: Shrey Puranik Date: Fri, 8 Mar 2019 15:15:58 +0000 Subject: [PATCH] Readability updates Fixes docblock, minor formatting tweak for readbility, and adds a new docblock for getSlackData record. --- src/Monolog/Handler/Slack/SlackRecord.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Monolog/Handler/Slack/SlackRecord.php b/src/Monolog/Handler/Slack/SlackRecord.php index e2f66492..ccade4c9 100644 --- a/src/Monolog/Handler/Slack/SlackRecord.php +++ b/src/Monolog/Handler/Slack/SlackRecord.php @@ -85,8 +85,16 @@ class SlackRecord */ 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->username = $username; $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 { $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. */ public function getAttachmentColor(int $level): string