Quellcode durchsuchen

Merge pull request #25930 from nextcloud/techdept/psalm/25839/RedundantPropertyInitializationCheck

Fix RedundantPropertyInitializationCheck
tags/v22.0.0beta1
Roeland Jago Douma vor 3 Jahren
Ursprung
Commit
45cfeefd1b
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 1
- 1
lib/private/Cache/File.php Datei anzeigen

@@ -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()) {

+ 2
- 2
lib/private/Files/Storage/DAV.php Datei anzeigen

@@ -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;
}


+ 2
- 2
lib/private/Route/Router.php Datei anzeigen

@@ -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);

+ 2
- 2
lib/private/User/User.php Datei anzeigen

@@ -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

Laden…
Abbrechen
Speichern