Psalm RedundantPropertyInitializationCheck fixes

For #25641

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-02-15 12:12:47 +01:00
parent 84de7a8d63
commit 1bb33983da
3 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ class DAV extends Common {
'userName' => $this->user, 'userName' => $this->user,
'password' => $this->password, 'password' => $this->password,
]; ];
if (isset($this->authType)) { if ($this->authType !== null) {
$settings['authType'] = $this->authType; $settings['authType'] = $this->authType;
} }

View File

@ -95,7 +95,7 @@ class Router implements IRouter {
* @return string[] * @return string[]
*/ */
public function getRoutingFiles() { public function getRoutingFiles() {
if (!isset($this->routingFiles)) { if ($this->routingFiles === null) {
$this->routingFiles = []; $this->routingFiles = [];
foreach (\OC_APP::getEnabledApps() as $app) { foreach (\OC_APP::getEnabledApps() as $app) {
$appPath = \OC_App::getAppPath($app); $appPath = \OC_App::getAppPath($app);

View File

@ -128,7 +128,7 @@ class User implements IUser {
* @return string * @return string
*/ */
public function getDisplayName() { public function getDisplayName() {
if (!isset($this->displayName)) { if ($this->displayName === null) {
$displayName = ''; $displayName = '';
if ($this->backend && $this->backend->implementsActions(Backend::GET_DISPLAYNAME)) { if ($this->backend && $this->backend->implementsActions(Backend::GET_DISPLAYNAME)) {
// get display name and strip whitespace from the beginning and end of it // get display name and strip whitespace from the beginning and end of it