From 773a73ecffecb915b77a1717c8139ddb53d3211c Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:30:02 +1200 Subject: [PATCH] FIX Respect strict-typing of Factory interface (#108) --- src/Services/ClientFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/ClientFactory.php b/src/Services/ClientFactory.php index ef066f0..ec2693d 100644 --- a/src/Services/ClientFactory.php +++ b/src/Services/ClientFactory.php @@ -2,6 +2,7 @@ namespace SilverStripe\EnvironmentCheck\Services; +use Psr\Http\Client\ClientInterface; use GuzzleHttp\Client as GuzzleClient; use SilverStripe\Core\Injector\Factory; use SilverStripe\Core\Config\Configurable; @@ -28,7 +29,7 @@ class ClientFactory implements Factory * * {@inheritdoc} */ - public function create($service, array $params = []) + public function create(string $service, array $params = []): ClientInterface { return new GuzzleClient($this->getConfig($params)); }