aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-04 14:49:58 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-09 09:49:45 +0100
commit618805b14f163e630577f9ad701b12fa017a1d70 (patch)
tree7a4a0d74e31cfc97477c9d3b90de3c327942e00f
parent7198bed22d07493f7d5b98e0a0525e8c22b8361f (diff)
downloadnextcloud-server-618805b14f163e630577f9ad701b12fa017a1d70.tar.gz
nextcloud-server-618805b14f163e630577f9ad701b12fa017a1d70.zip
Fix RedundantPropertyInitializationCheck
For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/Cache/File.php2
-rw-r--r--lib/private/Files/Storage/DAV.php4
-rw-r--r--lib/private/Route/Router.php4
-rw-r--r--lib/private/User/User.php4
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php
index 04ec33f7615..756bc9c36a5 100644
--- a/lib/private/Cache/File.php
+++ b/lib/private/Cache/File.php
@@ -49,7 +49,7 @@ class File implements ICache {
* @throws \OC\User\NoUserException
*/
protected function getStorage() {
- if (isset($this->storage)) {
+ if ($this->storage !== null) {
return $this->storage;
}
if (\OC::$server->getUserSession()->isLoggedIn()) {
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 0c9c41a3d9b..8f09452e1fb 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -69,7 +69,7 @@ class DAV extends Common {
protected $password;
/** @var string */
protected $user;
- /** @var string */
+ /** @var string|null */
protected $authType;
/** @var string */
protected $host;
@@ -143,7 +143,7 @@ class DAV extends Common {
'userName' => $this->user,
'password' => $this->password,
];
- if (isset($this->authType)) {
+ if ($this->authType !== null) {
$settings['authType'] = $this->authType;
}
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index 8a7123ffc88..2ed8a1991e7 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -56,7 +56,7 @@ class Router implements IRouter {
protected $root = null;
/** @var null|UrlGenerator */
protected $generator = null;
- /** @var string[] */
+ /** @var string[]|null */
protected $routingFiles;
/** @var bool */
protected $loaded = false;
@@ -95,7 +95,7 @@ class Router implements IRouter {
* @return string[]
*/
public function getRoutingFiles() {
- if (!isset($this->routingFiles)) {
+ if ($this->routingFiles === null) {
$this->routingFiles = [];
foreach (\OC_APP::getEnabledApps() as $app) {
$appPath = \OC_App::getAppPath($app);
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 24082926b0d..5bc42a469d7 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -61,7 +61,7 @@ class User implements IUser {
/** @var string */
private $uid;
- /** @var string */
+ /** @var string|null */
private $displayName;
/** @var UserInterface|null */
@@ -128,7 +128,7 @@ class User implements IUser {
* @return string
*/
public function getDisplayName() {
- if (!isset($this->displayName)) {
+ if ($this->displayName === null) {
$displayName = '';
if ($this->backend && $this->backend->implementsActions(Backend::GET_DISPLAYNAME)) {
// get display name and strip whitespace from the beginning and end of it