From fce30ce02ad1118861087ea73c483f7b6f171ebc Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:29:44 +1200 Subject: [PATCH] FIX Respect strict-typing of Factory interface (#85) --- 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.');