Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Mar 5, 2024
1 parent 165c5a0 commit 8d4b21f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/Foundation/Authenticators/BasicAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class BasicAuthenticator extends OptionsAuthenticator
{
public function __construct(string $username, string $password, string $type = 'basic')
{
parent::__construct([
RequestOptions::AUTH => [$username, $password, $type],
]);
parent::__construct([RequestOptions::AUTH => [$username, $password, $type]]);
}
}
6 changes: 1 addition & 5 deletions src/Foundation/Authenticators/BearerAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class BearerAuthenticator extends OptionsAuthenticator
{
public function __construct(string $token, ?string $bearer = 'Bearer')
{
parent::__construct([
RequestOptions::HEADERS => [
'Authorization' => ltrim("$bearer $token"),
],
]);
parent::__construct([RequestOptions::HEADERS => ['Authorization' => ltrim("$bearer $token")]]);
}
}
4 changes: 1 addition & 3 deletions src/Foundation/Authenticators/CertificateAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class CertificateAuthenticator extends OptionsAuthenticator
{
public function __construct(string $path, ?string $password = null)
{
parent::__construct([
RequestOptions::CERT => \is_string($password) ? [$path, $password] : $path,
]);
parent::__construct([RequestOptions::CERT => \is_string($password) ? [$path, $password] : $path]);
}
}
2 changes: 1 addition & 1 deletion src/Foundation/Concerns/AsBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ trait AsBody
public function toHttpOptions(): array
{
return [
RequestOptions::BODY => Utils::streamFor(http_build_query($this->getOptions())),
RequestOptions::BODY => Utils::streamFor(http_build_query($this->getOptions(), '', '&')),
];
}
}

0 comments on commit 8d4b21f

Please sign in to comment.