summaryrefslogtreecommitdiffstats
path: root/lib/private/Security/CSRF/TokenStorage
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-05 15:01:02 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-05 15:01:02 +0100
commit2c8402aa170d445c549f0409325730e780eb4764 (patch)
tree7b752977ca39ff152f7ad48f5f4939984b4bf5b5 /lib/private/Security/CSRF/TokenStorage
parentc85c64c787057afac7000c0c24a7b791f4788c55 (diff)
downloadnextcloud-server-2c8402aa170d445c549f0409325730e780eb4764.tar.gz
nextcloud-server-2c8402aa170d445c549f0409325730e780eb4764.zip
Make \OC\Security\CSRF strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Security/CSRF/TokenStorage')
-rw-r--r--lib/private/Security/CSRF/TokenStorage/SessionStorage.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php
index 946330b0c8c..b35e148c7ce 100644
--- a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php
+++ b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -54,7 +55,7 @@ class SessionStorage {
* @return string
* @throws \Exception
*/
- public function getToken() {
+ public function getToken(): string {
$token = $this->session->get('requesttoken');
if(empty($token)) {
throw new \Exception('Session does not contain a requesttoken');
@@ -68,7 +69,7 @@ class SessionStorage {
*
* @param string $value
*/
- public function setToken($value) {
+ public function setToken(string $value) {
$this->session->set('requesttoken', $value);
}
@@ -83,7 +84,7 @@ class SessionStorage {
*
* @return bool
*/
- public function hasToken() {
+ public function hasToken(): bool {
return $this->session->exists('requesttoken');
}
}