Skip to content

Commit 456ea0d

Browse files
committed
Do not allow falsey values to mean the same as null.
1 parent af6fd31 commit 456ea0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/HttpClient/HttpPluginClientBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class HttpPluginClientBuilder
3434
*/
3535
public function __construct(?ClientInterface $httpClient = null, $requestFactory = null)
3636
{
37-
$requestFactory = $requestFactory ?: Psr17FactoryDiscovery::findRequestFactory();
37+
$requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory();
3838
if ($requestFactory instanceof RequestFactory) {
3939
// Use same format as symfony/deprecation-contracts.
4040
@trigger_error(sprintf(
@@ -55,7 +55,7 @@ public function __construct(?ClientInterface $httpClient = null, $requestFactory
5555
));
5656
}
5757

58-
$this->httpClient = $httpClient ?: Psr18ClientDiscovery::find();
58+
$this->httpClient = $httpClient ?? Psr18ClientDiscovery::find();
5959
$this->requestFactory = $requestFactory;
6060
}
6161

0 commit comments

Comments
 (0)