diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 12:36:25 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 12:36:25 +0100 |
commit | 6bbea33133867c0fc7dc0ab1df74a38c30843141 (patch) | |
tree | 035b6310da06ca747733c36b5c09d0c97b886e22 /apps | |
parent | 26682b6936dcc127393655754500a1848d28c7d0 (diff) | |
download | nextcloud-server-6bbea33133867c0fc7dc0ab1df74a38c30843141.tar.gz nextcloud-server-6bbea33133867c0fc7dc0ab1df74a38c30843141.zip |
Simplify ternary operator statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Controller/AjaxController.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Jobs/CleanUp.php | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index 9c2953851f5..66cbcae3e8f 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -110,9 +110,7 @@ class AjaxController extends Controller { $currentUser = $this->userSession->getUser(); // Non-admins can only edit their own credentials - $allowedToEdit = ( - $this->groupManager->isAdmin($currentUser->getUID()) || $currentUser->getUID() === $uid - ) ? true : false; + $allowedToEdit = ($this->groupManager->isAdmin($currentUser->getUID()) || $currentUser->getUID() === $uid); if ($allowedToEdit) { $this->globalAuth->saveAuth($uid, $user, $password); diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index c51bc1a75dd..fdd69987658 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -348,7 +348,7 @@ class ShareController extends Controller { $freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 } - $hideFileList = $share->getPermissions() & \OCP\Constants::PERMISSION_READ ? false : true; + $hideFileList = !($share->getPermissions() & \OCP\Constants::PERMISSION_READ); $maxUploadFilesize = $freeSpace; $folder = new Template('files', 'list', ''); diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php index 14682c65ce1..df7d888a902 100644 --- a/apps/user_ldap/lib/Jobs/CleanUp.php +++ b/apps/user_ldap/lib/Jobs/CleanUp.php @@ -156,7 +156,7 @@ class CleanUp extends TimedJob { * @return bool */ public function isOffsetResetNecessary($resultCount) { - return ($resultCount < $this->limit) ? true : false; + return $resultCount < $this->limit; } /** |