Skip to content

Commit

Permalink
remove function imports (#2820)
Browse files Browse the repository at this point in the history
  • Loading branch information
stobrien89 authored Nov 13, 2023
1 parent 44d2e8d commit 115b60e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Credentials/InstanceProfileProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Http\Message\ResponseInterface;
use function Aws\boolean_value;
use function Aws\default_http_handler;

/**
* Credential provider that provides credentials from the EC2 metadata service.
Expand Down Expand Up @@ -66,7 +64,7 @@ public function __construct(array $config = [])
$this->timeout = (float) getenv(self::ENV_TIMEOUT) ?: ($config['timeout'] ?? self::DEFAULT_TIMEOUT);
$this->profile = $config['profile'] ?? null;
$this->retries = (int) getenv(self::ENV_RETRIES) ?: ($config['retries'] ?? self::DEFAULT_RETRIES);
$this->client = $config['client'] ?? default_http_handler();
$this->client = $config['client'] ?? \Aws\default_http_handler();
$this->ec2MetadataV1Disabled = $config[self::CFG_EC2_METADATA_V1_DISABLED] ?? null;
}

Expand Down Expand Up @@ -317,8 +315,8 @@ private function decodeResult($response)
* @return bool
*/
private function shouldFallbackToIMDSv1(): bool {
$isImdsV1Disabled = boolean_value($this->ec2MetadataV1Disabled)
?? boolean_value(
$isImdsV1Disabled = \Aws\boolean_value($this->ec2MetadataV1Disabled)
?? \Aws\boolean_value(
ConfigurationResolver::resolve(
self::CFG_EC2_METADATA_V1_DISABLED,
self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED,
Expand Down

0 comments on commit 115b60e

Please sign in to comment.