Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP CS Fixer - ordered_types #23

Merged
merged 7 commits into from Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/HttpClient.php
Expand Up @@ -33,7 +33,7 @@ public function __construct(array $options = [])

public function request(
string $url,
array|string|null $args = null,
null|array|string $args = null,
string $method = Request::DEFAULT_METHOD,
array $options = [],
): Response {
Expand Down
8 changes: 4 additions & 4 deletions src/Request.php
Expand Up @@ -30,14 +30,14 @@ final class Request
public const DEFAULT_METHOD = self::GET;

private string $url = '';
private string|array|null $args = null;
private null|array|string $args = null;
private string $method = self::GET;
private array $headers = [];
private Options $options;

public function __construct(
string $url = '',
array|string|null $args = [],
null|array|string $args = [],
string $method = self::DEFAULT_METHOD,
array $headers = [],
array|Options $options = [],
Expand All @@ -62,7 +62,7 @@ public function setUrl(string $url): self
return $this;
}

public function setArgs(array|string|null $args): self
public function setArgs(null|array|string $args): self
{
$this->args = $args;

Expand Down Expand Up @@ -114,7 +114,7 @@ public function getUri(): string
return $this->url;
}

public function getArgs(): array|string|null
public function getArgs(): null|array|string
{
return $this->method === self::GET ? null : $this->args;
}
Expand Down