Clean activity getBespokeTokens
authorMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 18 Mar 2022 12:11:13 +0000 (12:11 +0000)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 18 Mar 2022 12:11:36 +0000 (12:11 +0000)
CRM/Activity/Tokens.php

index 697a98f0d6e587f014d0941b8ffd511c8ce4f045..beb85d40281cdbb7d9ce6b7a4f5e14aa848e5828 100644 (file)
@@ -101,16 +101,13 @@ class CRM_Activity_Tokens extends CRM_Core_EntityTokens {
   protected function getBespokeTokens(): array {
     $tokens = [];
     if (CRM_Core_Component::isEnabled('CiviCase')) {
-      $tokens['case_id'] = ts('Activity Case ID');
-      return [
-        'case_id' => [
-          'title' => ts('Activity Case ID'),
-          'name' => 'case_id',
-          'type' => 'calculated',
-          'options' => NULL,
-          'data_type' => 'Integer',
-          'audience' => 'user',
-        ],
+      $tokens['case_id'] = [
+        'title' => ts('Activity Case ID'),
+        'name' => 'case_id',
+        'type' => 'calculated',
+        'options' => NULL,
+        'data_type' => 'Integer',
+        'audience' => 'user',
       ];
     }
     return $tokens;