Convert isset ternary to null coalescing operator

Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
This commit is contained in:
Hamid Dehnavi 2023-07-07 14:15:12 +03:30 committed by Ferdinand Thiessen
parent 00a3ab9599
commit 271e63e41c
2 changed files with 2 additions and 2 deletions

View file

@ -168,7 +168,7 @@ class Dummy extends Backend implements \OCP\IUserBackend {
}
public function getDisplayName($uid) {
return isset($this->displayNames[$uid])? $this->displayNames[$uid]: $uid;
return $this->displayNames[$uid] ?? $uid;
}
/**

View file

@ -30,7 +30,7 @@ class UtilCheckServerTest extends \Test\TestCase {
$config->expects($this->any())
->method('getValue')
->willReturnCallback(function ($key, $default) use ($systemOptions) {
return isset($systemOptions[$key]) ? $systemOptions[$key] : $default;
return $systemOptions[$key] ?? $default;
});
return $config;
}