summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-07 14:15:12 +0330
committerFerdinand Thiessen <opensource@fthiessen.de>2023-08-17 01:36:50 +0200
commit271e63e41c26b77bdff8b15c04163195dc7b7a55 (patch)
treebff4e6a2a36a1196f0be9972cf086588f756c815 /tests
parent00a3ab9599cd702d463a10ebc65a049741acbe06 (diff)
downloadnextcloud-server-271e63e41c26b77bdff8b15c04163195dc7b7a55.tar.gz
nextcloud-server-271e63e41c26b77bdff8b15c04163195dc7b7a55.zip
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Util/User/Dummy.php2
-rw-r--r--tests/lib/UtilCheckServerTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php
index 478b7599701..7106d879256 100644
--- a/tests/lib/Util/User/Dummy.php
+++ b/tests/lib/Util/User/Dummy.php
@@ -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;
}
/**
diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php
index 9ddb1f8e45f..7e47734ede7 100644
--- a/tests/lib/UtilCheckServerTest.php
+++ b/tests/lib/UtilCheckServerTest.php
@@ -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;
}