-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
975c564
commit 7e76353
Showing
2 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,14 @@ class HttpHandlerFactory | |
* Builds out a default http handler for the installed version of guzzle. | ||
* | ||
* @param ClientInterface $client | ||
* @param LoggerInterface $logger | ||
* @param null|false|LoggerInterface $logger | ||
* @param bool $loggerDisabled | ||
* @return Guzzle6HttpHandler|Guzzle7HttpHandler | ||
* @throws \Exception | ||
*/ | ||
public static function build( | ||
Check failure on line 38 in src/HttpHandler/HttpHandlerFactory.php GitHub Actions / PHPStan Static Analysis / PHPStan Static Analysis
|
||
ClientInterface $client = null, | ||
LoggerInterface $logger = null, | ||
bool $loggerDisabled = false | ||
null|false|LoggerInterface $logger = null, | ||
) | ||
{ | ||
if (is_null($client)) { | ||
|
@@ -53,7 +52,7 @@ public static function build( | |
$client = new Client(['handler' => $stack]); | ||
} | ||
|
||
if (!$loggerDisabled) { | ||
if ($logger !== false) { | ||
$logger = $logger ?? ApplicationDefaultCredentials::getDefaultLogger(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters