Skip to content

Commit

Permalink
Fixing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Jul 2, 2024
1 parent 2c0cbae commit 6facbc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ class Request extends Http\Request implements IRequest

/**
* @param Http\UrlScript $url
* @param array|null $post
* @param array|null $files
* @param array|null $cookies
* @param array|null $headers
* @param string|null $method
* @param array $post
* @param array $files
* @param array $cookies
* @param array $headers
* @param string $method
* @param string|null $remoteAddress
* @param string|null $remoteHost
* @param null $rawBodyCallback
*/
public function __construct(
Http\UrlScript $url,
?array $post = null,
?array $files = null,
?array $cookies = null,
?array $headers = null,
?string $method = null,
array $post = [],
array $files = [],
array $cookies = [],
array $headers = [],
string $method = 'GET',
?string $remoteAddress = null,
?string $remoteHost = null,
$rawBodyCallback = null
Expand Down Expand Up @@ -67,7 +67,7 @@ public function getUrl(): Http\UrlScript
/**
* {@inheritdoc}
*/
public function getQuery(?string $key = null)
public function getQuery(?string $key = null): mixed
{
if (func_num_args() === 0) {
return $this->url->getQueryParameters();
Expand Down
2 changes: 1 addition & 1 deletion src/Http/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function createHttpRequest(string $packet): ?IRequest
unset($list, $key, $val, $k, $v);
}

$request = new Request(new Http\UrlScript($url), null, null, $cookies, $headers, $method, $remoteAddr, $remoteHost, function () use ($rawBody): ?string {
$request = new Request(new Http\UrlScript($url), [], [], $cookies, $headers, $method, $remoteAddr, $remoteHost, function () use ($rawBody): ?string {
return $rawBody;
});

Expand Down

0 comments on commit 6facbc0

Please sign in to comment.