summaryrefslogtreecommitdiffstats
path: root/lib/private/Security
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-23 21:03:26 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 11:39:29 +0200
commit5f227bd93b23d8a528476e3d9243dae31c9d0050 (patch)
treefaf627e7fbd8c510e897028ac88048d6ae590145 /lib/private/Security
parent5eee110b15169240134fc54672fe38da63bc7fb1 (diff)
downloadnextcloud-server-5f227bd93b23d8a528476e3d9243dae31c9d0050.tar.gz
nextcloud-server-5f227bd93b23d8a528476e3d9243dae31c9d0050.zip
More phpstorm inspection fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Security')
-rw-r--r--lib/private/Security/Crypto.php4
-rw-r--r--lib/private/Security/Hasher.php4
-rw-r--r--lib/private/Security/TrustedDomainHelper.php4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php
index 176faf68e2d..1dd680ea13f 100644
--- a/lib/private/Security/Crypto.php
+++ b/lib/private/Security/Crypto.php
@@ -56,7 +56,7 @@ class Crypto implements ICrypto {
* @param IConfig $config
* @param ISecureRandom $random
*/
- function __construct(IConfig $config, ISecureRandom $random) {
+ public function __construct(IConfig $config, ISecureRandom $random) {
$this->cipher = new AES();
$this->config = $config;
$this->random = $random;
@@ -115,7 +115,7 @@ class Crypto implements ICrypto {
$this->cipher->setPassword($password);
$parts = explode('|', $authenticatedCiphertext);
- if(sizeof($parts) !== 3) {
+ if(count($parts) !== 3) {
throw new \Exception('Authenticated ciphertext could not be decoded.');
}
diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php
index 3bc546fa0a2..ddba82fec43 100644
--- a/lib/private/Security/Hasher.php
+++ b/lib/private/Security/Hasher.php
@@ -58,7 +58,7 @@ class Hasher implements IHasher {
/**
* @param IConfig $config
*/
- function __construct(IConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
$hashingCost = $this->config->getSystemValue('hashingCost', null);
@@ -86,7 +86,7 @@ class Hasher implements IHasher {
*/
protected function splitHash($prefixedHash) {
$explodedString = explode('|', $prefixedHash, 2);
- if(sizeof($explodedString) === 2) {
+ if(count($explodedString) === 2) {
if((int)$explodedString[0] > 0) {
return array('version' => (int)$explodedString[0], 'hash' => $explodedString[1]);
}
diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php
index a8cbdb6ee6c..221d21fb6a4 100644
--- a/lib/private/Security/TrustedDomainHelper.php
+++ b/lib/private/Security/TrustedDomainHelper.php
@@ -38,7 +38,7 @@ class TrustedDomainHelper {
/**
* @param IConfig $config
*/
- function __construct(IConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
}
@@ -89,7 +89,7 @@ class TrustedDomainHelper {
if (gettype($trusted) !== 'string') {
break;
}
- $regex = '/^' . join('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/';
+ $regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/';
if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
return true;
}