mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 17:46:09 +02:00
Add some return type hints and fix up HandlerWrapper
This commit is contained in:
@@ -30,7 +30,7 @@ trait FormattableHandlerTrait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setFormatter(FormatterInterface $formatter)
|
||||
public function setFormatter(FormatterInterface $formatter): HandlerInterface
|
||||
{
|
||||
$this->formatter = $formatter;
|
||||
|
||||
@@ -40,7 +40,7 @@ trait FormattableHandlerTrait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFormatter()
|
||||
public function getFormatter(): FormatterInterface
|
||||
{
|
||||
if (!$this->formatter) {
|
||||
$this->formatter = $this->getDefaultFormatter();
|
||||
@@ -54,7 +54,7 @@ trait FormattableHandlerTrait
|
||||
*
|
||||
* @return FormatterInterface
|
||||
*/
|
||||
protected function getDefaultFormatter()
|
||||
protected function getDefaultFormatter(): FormatterInterface
|
||||
{
|
||||
return new LineFormatter();
|
||||
}
|
||||
|
Reference in New Issue
Block a user