Skip to content

Commit de07775

Browse files
committed
cs
1 parent d92cb97 commit de07775

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Bridges/HttpDI/SessionExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getConfigSchema(): Nette\Schema\Schema
4444
'readAndClose' => Expect::bool(),
4545
'cookieSamesite' => Expect::anyOf(IResponse::SameSiteLax, IResponse::SameSiteStrict, IResponse::SameSiteNone)
4646
->firstIsDefault(),
47-
])->otherItems('mixed');
47+
])->otherItems();
4848
}
4949

5050

src/Http/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
/**
16-
* Rendering helpers for HTTP.
16+
* Helper functions for HTTP requests, responses and headers.
1717
*/
1818
final class Helpers
1919
{

src/Http/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Nette\Http;
99

1010
use Nette;
11-
use function array_change_key_case, base64_decode, count, explode, gethostbyaddr, implode, in_array, preg_match, preg_match_all, rsort, strcasecmp, strtr;
11+
use function array_change_key_case, base64_decode, count, explode, func_num_args, gethostbyaddr, implode, preg_match, preg_match_all, rsort, strcasecmp, strtr;
1212

1313

1414
/**
@@ -138,7 +138,7 @@ public function getFiles(): array
138138
/**
139139
* Returns a cookie or `null` if it does not exist.
140140
*/
141-
public function getCookie(string $key): mixed
141+
public function getCookie(string $key): ?string
142142
{
143143
return $this->cookies[$key] ?? null;
144144
}

src/Http/RequestFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function setBinary(bool $binary = true): static
5353
* Sets the trusted proxy IP addresses or CIDR blocks used to resolve the real client IP and URL scheme.
5454
* @param string|list<string> $proxy
5555
*/
56-
public function setProxy($proxy): static
56+
public function setProxy(string|array $proxy): static
5757
{
5858
$this->proxies = (array) $proxy;
5959
return $this;
@@ -255,7 +255,7 @@ private function getFiles(): array
255255
private function getHeaders(): array
256256
{
257257
if (function_exists('apache_request_headers')) {
258-
$headers = apache_request_headers();
258+
$headers = apache_request_headers() ?: [];
259259
} else {
260260
$headers = [];
261261
foreach ($_SERVER as $k => $v) {

0 commit comments

Comments
 (0)