FIX Respect strict-typing of Factory interface (#108)

This commit is contained in:
Guy Sartorelli 2024-07-12 12:30:02 +12:00 committed by GitHub
parent 2598d60a0d
commit 773a73ecff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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));
}