From 33e273b3c6fbed1cb85cabbc8a239b6452901277 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 9 Jul 2024 10:17:19 +1200 Subject: [PATCH] FIX Respect strict-typing of Factory interface --- code/AuditFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AuditFactory.php b/code/AuditFactory.php index ebd4015..7c47508 100644 --- a/code/AuditFactory.php +++ b/code/AuditFactory.php @@ -7,6 +7,7 @@ use Monolog\Handler\SyslogHandler; use Monolog\Logger; use Monolog\Processor\WebProcessor; +use Psr\Log\LoggerInterface; use SilverStripe\Core\Injector\Factory; /** @@ -15,7 +16,7 @@ */ class AuditFactory implements Factory { - public function create($service, array $params = []) + public function create(string $service, array $params = []): LoggerInterface { if (!empty($params)) { throw new Exception('AuditFactory does not support passing params.');