From 614f9ec0a2fd3c6752e7da2a59063df09d3bdbff Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Sun, 15 Sep 2024 21:01:34 +0200 Subject: refactor: Use the elvis operator Signed-off-by: Christoph Wurst --- apps/user_ldap/lib/User/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/user_ldap') diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index b500c72ca98..3423455e819 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -646,8 +646,7 @@ class User { try { $accountProperty = $account->getProperty($property); $currentValue = $accountProperty->getValue(); - $scope = ($accountProperty->getScope() ? $accountProperty->getScope() - : $defaultScopes[$property]); + $scope = ($accountProperty->getScope() ?: $defaultScopes[$property]); } catch (PropertyDoesNotExistException $e) { // thrown at getProperty $this->logger->error('property does not exist: '.$property .' for uid='.$this->uid.'', ['app' => 'user_ldap', 'exception' => $e]); -- cgit v1.2.3