diff options
Diffstat (limited to 'src/Monolog/Handler/StreamHandler.php')
-rw-r--r-- | src/Monolog/Handler/StreamHandler.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Monolog/Handler/StreamHandler.php b/src/Monolog/Handler/StreamHandler.php index 09a1573..5abbc59 100644 --- a/src/Monolog/Handler/StreamHandler.php +++ b/src/Monolog/Handler/StreamHandler.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); /* * This file is part of the Monolog package. @@ -22,8 +22,10 @@ use Monolog\Logger; */ class StreamHandler extends AbstractProcessingHandler { + /** @var resource|null */ protected $stream; protected $url; + /** @var string|null */ private $errorMessage; protected $filePermission; protected $useLocking; @@ -96,7 +98,7 @@ class StreamHandler extends AbstractProcessingHandler } $this->createDir(); $this->errorMessage = null; - set_error_handler(array($this, 'customErrorHandler')); + set_error_handler([$this, 'customErrorHandler']); $this->stream = fopen($this->url, 'a'); if ($this->filePermission !== null) { @chmod($this->url, $this->filePermission); @@ -123,7 +125,7 @@ class StreamHandler extends AbstractProcessingHandler /** * Write to stream * @param resource $stream - * @param array $record + * @param array $record */ protected function streamWrite($stream, array $record) { @@ -164,7 +166,7 @@ class StreamHandler extends AbstractProcessingHandler $dir = $this->getDirFromStream($this->url); if (null !== $dir && !is_dir($dir)) { $this->errorMessage = null; - set_error_handler(array($this, 'customErrorHandler')); + set_error_handler([$this, 'customErrorHandler']); $status = mkdir($dir, 0777, true); restore_error_handler(); if (false === $status) { |