From d717e4fe918a171c707f7e82da4b2a57c666f088 Mon Sep 17 00:00:00 2001 From: colemanw Date: Thu, 24 Aug 2023 13:50:01 -0400 Subject: [PATCH] REF/tests - Simplify inline conditionals with Elvis --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 973a120a5f43..08b5e7eadffb 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1430,7 +1430,7 @@ public function CustomGroupMultipleCreateWithFields($params = []) { public function entityCustomGroupWithSingleFieldCreate($function, $filename): array { $params = ['title' => $function]; $entity = substr(basename($filename), 0, strlen(basename($filename)) - 8); - $params['extends'] = $entity ? $entity : 'Contact'; + $params['extends'] = $entity ?: 'Contact'; $customGroup = $this->customGroupCreate($params); $customField = $this->customFieldCreate(['custom_group_id' => $customGroup['id'], 'label' => $function]); CRM_Core_PseudoConstant::flush(); @@ -1453,7 +1453,7 @@ public function entityCustomGroupWithSingleFieldCreate($function, $filename): ar public function entityCustomGroupWithSingleStringMultiSelectFieldCreate($function, $filename) { $params = ['title' => $function]; $entity = substr(basename($filename), 0, strlen(basename($filename)) - 8); - $params['extends'] = $entity ? $entity : 'Contact'; + $params['extends'] = $entity ?: 'Contact'; $customGroup = $this->customGroupCreate($params); $customField = $this->customFieldCreate(['custom_group_id' => $customGroup['id'], 'label' => $function, 'html_type' => 'Multi-Select', 'default_value' => 1]); CRM_Core_PseudoConstant::flush();