Skip to content

Commit

Permalink
FIX Respect strict-typing of Factory interface (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jul 12, 2024
1 parent bd57943 commit fce30ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/AuditFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Monolog\Handler\SyslogHandler;
use Monolog\Logger;
use Monolog\Processor\WebProcessor;
use Psr\Log\LoggerInterface;
use SilverStripe\Core\Injector\Factory;

/**
Expand All @@ -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.');
Expand Down

0 comments on commit fce30ce

Please sign in to comment.