From ecf0793f289f5a34028d799dce164db2f6274123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 12 Jan 2023 15:19:28 +0100 Subject: [PATCH] chore: Add typings to Log properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Log.php | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/lib/private/Log.php b/lib/private/Log.php index c3e6aac07e2cb..703160f12568f 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -59,21 +59,11 @@ * MonoLog is an example implementing this interface. */ class Log implements ILogger, IDataLogger { - - /** @var IWriter */ - private $logger; - - /** @var SystemConfig */ - private $config; - - /** @var boolean|null cache the result of the log condition check for the request */ - private $logConditionSatisfied = null; - - /** @var Normalizer */ - private $normalizer; - - /** @var IRegistry */ - private $crashReporters; + private IWriter $logger; + private ?SystemConfig $config; + private ?bool $logConditionSatisfied = null; + private ?Normalizer $normalizer; + private ?IRegistry $crashReporters; /** * @param IWriter $logger The logger that should be used @@ -81,7 +71,7 @@ class Log implements ILogger, IDataLogger { * @param Normalizer|null $normalizer * @param IRegistry|null $registry */ - public function __construct(IWriter $logger, SystemConfig $config = null, $normalizer = null, IRegistry $registry = null) { + public function __construct(IWriter $logger, SystemConfig $config = null, Normalizer $normalizer = null, IRegistry $registry = null) { // FIXME: Add this for backwards compatibility, should be fixed at some point probably if ($config === null) { $config = \OC::$server->getSystemConfig();