aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-12-19 11:05:02 +0100
committerGitHub <noreply@github.com>2022-12-19 11:05:02 +0100
commit26e413b78d52d0b0b7b19a2e1d615f408f9ff77a (patch)
tree1b988f32adeaa1d08315454748f38bb1538cd76a /lib/private/AppFramework/Http
parentcbbb0712db0f33a41ef66ae59d5c70ba1e23748f (diff)
parent585cf0022c589f85c05de67e82f0234f77dd9dd9 (diff)
downloadnextcloud-server-26e413b78d52d0b0b7b19a2e1d615f408f9ff77a.tar.gz
nextcloud-server-26e413b78d52d0b0b7b19a2e1d615f408f9ff77a.zip
Merge pull request #35496 from nextcloud/fix/strict-typing-in-base
Diffstat (limited to 'lib/private/AppFramework/Http')
-rw-r--r--lib/private/AppFramework/Http/Request.php25
1 files changed, 8 insertions, 17 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 286187c696c..32cce8a88e1 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -50,7 +50,6 @@ use OC\Security\TrustedDomainHelper;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IRequestId;
-use OCP\Security\ICrypto;
use Symfony\Component\HttpFoundation\IpUtils;
/**
@@ -79,10 +78,10 @@ class Request implements \ArrayAccess, \Countable, IRequest {
public const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
public const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|\[::1\])$/';
- protected $inputStream;
+ protected string $inputStream;
protected $content;
- protected $items = [];
- protected $allowedKeys = [
+ protected array $items = [];
+ protected array $allowedKeys = [
'get',
'post',
'files',
@@ -94,17 +93,11 @@ class Request implements \ArrayAccess, \Countable, IRequest {
'method',
'requesttoken',
];
- /** @var RequestId */
- protected $requestId;
- /** @var IConfig */
- protected $config;
- /** @var ICrypto */
- protected $crypto;
- /** @var CsrfTokenManager|null */
- protected $csrfTokenManager;
+ protected IRequestId $requestId;
+ protected IConfig $config;
+ protected ?CsrfTokenManager $csrfTokenManager;
- /** @var bool */
- protected $contentDecoded = false;
+ protected bool $contentDecoded = false;
/**
* @param array $vars An associative array with the following optional values:
@@ -139,9 +132,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
foreach ($this->allowedKeys as $name) {
- $this->items[$name] = isset($vars[$name])
- ? $vars[$name]
- : [];
+ $this->items[$name] = $vars[$name] ?? [];
}
$this->items['parameters'] = array_merge(