diff --git a/src/Monolog/Formatter/HtmlEmailFormatter.php b/src/Monolog/Formatter/HtmlEmailFormatter.php index bc696754..d5d6e527 100644 --- a/src/Monolog/Formatter/HtmlEmailFormatter.php +++ b/src/Monolog/Formatter/HtmlEmailFormatter.php @@ -17,7 +17,8 @@ namespace Monolog\Formatter; * * @author Tiago Brito */ -class HtmlEmailFormatter extends NormalizerFormatter { +class HtmlEmailFormatter extends NormalizerFormatter +{ /** * Translates Monolog log levels to html colors priorities. @@ -32,6 +33,7 @@ class HtmlEmailFormatter extends NormalizerFormatter { Logger::ALERT => '#d9534f', Logger::EMERGENCY => '#ffffff', ); + /** * @param string $format The format of the message * @param string $dateFormat The format of the timestamp: one supported by DateTime::format @@ -41,15 +43,29 @@ class HtmlEmailFormatter extends NormalizerFormatter { parent::__construct($dateFormat); } - private function addRow($th, $td=' ') + /** + * Create a HTML table row + * + * @param $th string Row header content + * @param string $td Row standard cell content + * @return string + */ + private function addRow($th, $td = ' ') { return "\n$th:\n".nl2br($td)."\n"; } + /** + * Create a HTML h1 tag + * + * @param $title string Text to be in the H1 + * @param $level integer Error level + * @return string + */ private function addTitle($title, $level) - { - return '

'.$title.'

'; - } + { + return '

'.$title.'

'; + } /** * Formats a log record. *