Skip to content

Commit

Permalink
PHP CS Fixer - ordered_types
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Smet committed Oct 14, 2023
1 parent c55eda1 commit e39fb85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/HttpClient.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit e39fb85

Please sign in to comment.