File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -77,14 +77,10 @@ public function run(?string $clientType = null): ClientInterface
7777 $ this ->initialize ();
7878 }
7979
80- switch (strtolower ($ clientType )) {
81- case ClientTypes::GUZZLE ->value :
82- return new Client ($ this ->clientConfig );
83- case ClientTypes::SYMFONY ->value :
84- $ symfonyClient = HttpClient::create ($ this ->clientConfig );
85- return new Psr18Client ($ symfonyClient );
86- default :
87- throw new InvalidArgumentException ("Unsupported client type: {$ clientType }" );
88- }
80+ return match (strtolower ($ clientType )) {
81+ ClientTypes::GUZZLE ->value => new Client ($ this ->clientConfig ),
82+ ClientTypes::SYMFONY ->value => new Psr18Client (HttpClient::create ($ this ->clientConfig )),
83+ default => throw new InvalidArgumentException ("Unsupported client type: {$ clientType }" )
84+ };
8985 }
9086}
You can’t perform that action at this time.
0 commit comments