mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
This commit is contained in:
parent
00a3ab9599
commit
271e63e41c
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue