summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-11-29 16:29:12 +0100
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-12-19 09:10:40 +0000
commitcf508c1e4730f3590b956735678413484e2c008c (patch)
treea55749e12921fe5fa76c6d0c4441e4bb117c2ac3 /lib/private/AppFramework
parent884da19198d15a764487e6a6d615968c0e63203d (diff)
downloadnextcloud-server-cf508c1e4730f3590b956735678413484e2c008c.tar.gz
nextcloud-server-cf508c1e4730f3590b956735678413484e2c008c.zip
Use strict typing in base.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/AppFramework')
-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(