[REF] Fix syntax of var docblocks
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 11 Sep 2022 17:27:30 +0000 (18:27 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 11 Sep 2022 18:51:34 +0000 (19:51 +0100)
61 files changed:
CRM/Campaign/BAO/Campaign.php
CRM/Contact/BAO/GroupContactCache.php
CRM/Core/BAO/UserJob.php
CRM/Core/DAO.php
CRM/Core/PseudoConstant.php
CRM/Dedupe/Merger.php
CRM/Financial/BAO/FinancialTypeAccount.php
CRM/Import/DataSource.php
CRM/Import/Forms.php
CRM/Import/Parser.php
CRM/Utils/Check.php
CRM/Utils/VersionCheck.php
Civi/Api4/Event/Subscriber/PermissionCheckSubscriber.php
Civi/Api4/Query/Api4SelectQuery.php
api/v3/Generic.php
api/v3/PaymentProcessor.php
api/v3/ReportTemplate.php
api/v3/utils.php
ext/search_kit/Civi/Api4/Event/Subscriber/SearchKitSubscriber.php
ext/search_kit/Civi/Search/Admin.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Activity/Import/Parser/ActivityTest.php
tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php
tests/phpunit/CRM/Contact/Form/Task/EmailTest.php
tests/phpunit/CRM/Contact/Form/Task/PDFLetterCommonTest.php
tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php
tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php
tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php
tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php
tests/phpunit/CRM/Contribute/Form/ContributionTest.php
tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php
tests/phpunit/CRM/Contribute/Form/TaskTest.php
tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php
tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php
tests/phpunit/CRM/Core/DAOTest.php
tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php
tests/phpunit/CRM/Event/Form/ParticipantTest.php
tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php
tests/phpunit/CRM/Event/Form/Registration/RegisterTest.php
tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php
tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php
tests/phpunit/CRM/Event/Form/Task/BadgeTest.php
tests/phpunit/CRM/Event/Form/Task/BatchTest.php
tests/phpunit/CRM/Event/Form/Task/RegisterTest.php
tests/phpunit/CRM/Event/Import/Parser/ParticipantTest.php
tests/phpunit/CRM/Import/DataSource/CsvTest.php
tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php
tests/phpunit/CRM/Member/Form/MembershipTest.php
tests/phpunit/CRM/Member/Form/Task/LabelTest.php
tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php
tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php
tests/phpunit/CRM/Price/Form/FieldTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionTest.php
tests/phpunit/api/v3/LoggingTest.php
tests/phpunit/api/v3/MembershipTest.php
tests/phpunit/api/v3/ReportTemplateTest.php
tools/bin/scripts/set-version.php

index e618542b4fb28d9718752266d1d8d83c5f171850..0174f2c5e3197567484084676689e8afa244f8f3 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
       }
     }
 
-    /* @var \CRM_Campaign_DAO_Campaign $campaign */
+    /** @var \CRM_Campaign_DAO_Campaign $campaign */
     $campaign = self::writeRecord($params);
 
     /* Create the campaign group record */
index 015e73b8e01ce58b4b0fe9b6c5369fa7b7cf5ab6..306cfcb553f3c231e6635e22ae7445043d1b4a31 100644 (file)
@@ -521,7 +521,7 @@ ORDER BY   gc.contact_id, g.children
     if (empty($apiParams['limit']) && empty($apiParams['offset'])) {
       unset($apiParams['orderBy']);
     }
-    /* @var $api \Civi\Api4\Generic\DAOGetAction */
+    /** @var \Civi\Api4\Generic\DAOGetAction $api */
     $api = Request::create($savedSearch['api_entity'], 'get', $apiParams);
     $query = new Api4SelectQuery($api);
     $query->forceSelectId = FALSE;
index 4cfb1d560b59636845844644d65ab2f63481361f..39acdb3dd5dc447974f7eb312b421aa956b200bb 100644 (file)
@@ -150,8 +150,8 @@ class CRM_Core_BAO_UserJob extends CRM_Core_DAO_UserJob implements \Civi\Core\Ho
     if ($types === NULL) {
       $types = [];
       $classes = ClassScanner::get(['interface' => UserJobInterface::class]);
+      /** @var \Civi\UserJob\UserJobInterface $class */
       foreach ($classes as $class) {
-        /* @var UserJobInterface $class */
         $declaredTypes = $class::getUserJobInfo();
         foreach ($declaredTypes as $index => $declaredType) {
           $declaredTypes[$index]['class'] = $class;
index 8106c36a6c44c7969a7a08d6014793d2d3acdd3d..7d916175019b4def0618c6bd7b495af7634bda7c 100644 (file)
@@ -2554,7 +2554,6 @@ SELECT contact_id
 
     $occurrences = [];
     foreach ($links as $refSpec) {
-      /** @var $refSpec CRM_Core_Reference_Interface */
       $daoName = CRM_Core_DAO_AllCoreTables::getClassForTable($refSpec->getReferenceTable());
       $result = $refSpec->findReferences($this);
       if ($result) {
@@ -2583,7 +2582,6 @@ SELECT contact_id
 
     $counts = [];
     foreach ($links as $refSpec) {
-      /** @var $refSpec CRM_Core_Reference_Interface */
       $count = $refSpec->getReferenceCount($this);
       if (!empty($count['count'])) {
         $counts[] = $count;
@@ -2591,7 +2589,6 @@ SELECT contact_id
     }
 
     foreach (CRM_Core_Component::getEnabledComponents() as $component) {
-      /** @var $component CRM_Core_Component_Info */
       $counts = array_merge($counts, $component->getReferenceCounts($this));
     }
     CRM_Utils_Hook::referenceCounts($this, $counts);
@@ -2621,7 +2618,7 @@ SELECT contact_id
       $links = $daoClassName::getReferenceColumns();
 
       foreach ($links as $refSpec) {
-        /** @var $refSpec CRM_Core_Reference_Interface */
+        /** @var CRM_Core_Reference_Interface $refSpec */
         if ($refSpec->matchesTargetTable($tableName)) {
           $refsFound[] = $refSpec;
         }
index 7f6e50531ce7a630f9960641aa35d0ea0185b8cd..4e3b97c0c18cf29e600b9526406421014aa10ec2 100644 (file)
@@ -429,7 +429,7 @@ class CRM_Core_PseudoConstant {
       return $var;
     }
 
-    /* @var CRM_Core_DAO $object */
+    /** @var CRM_Core_DAO $object */
     $object = new $name();
 
     $object->selectAdd();
@@ -1492,7 +1492,7 @@ WHERE  id = %1
       return FALSE;
     }
     // Get list of fields for the option table
-    /* @var CRM_Core_DAO $dao * */
+    /** @var CRM_Core_DAO $dao * */
     $dao = new $daoName();
     $availableFields = array_keys($dao->fieldKeys());
 
index 5c4df7f318135f5854d0d16aa94e306b32fcb47b..028e13cde8b8407b3527b9d1cc5d449ae818bbd1 100644 (file)
@@ -2716,8 +2716,8 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
    * @param array $locks
    */
   protected static function releaseLocks(array $locks) {
+    /** @var Civi\Core\Lock\LockInterface $lock */
     foreach ($locks as $lock) {
-      /* @var Civi\Core\Lock\LockInterface $lock */
       $lock->release();
     }
   }
index f54d4c0a20f652a8451a97b705a7886c60a2af0e..dd3be4a4ef8e695cb188c50edb72e4a256f7242b 100644 (file)
@@ -101,7 +101,7 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin
     foreach ($dependency as $name) {
       $daoString = 'CRM_' . $name[0] . '_DAO_' . $name[1];
       if (class_exists($daoString)) {
-        /* @var \CRM_Core_DAO $dao */
+        /** @var \CRM_Core_DAO $dao */
         $dao = new $daoString();
         $dao->financial_type_id = $financialTypeId;
         if ($dao->find(TRUE)) {
index bed5e651d8d1b93acf2a5de4e016fcbc514c5a48..e592c5a906f3381bb119105544542c3d3f609c17 100644 (file)
@@ -566,7 +566,7 @@ abstract class CRM_Import_DataSource {
         break;
       }
     }
-    /* @var \CRM_Import_Parser */
+    /** @var \CRM_Import_Parser $parser */
     $parser = new $parserClass();
     $parser->setUserJobID($this->getUserJobID());
     return $parser;
index 3e4130a08f445ddeeb1575f281b823486cc72f77..aeddf0e3bd8e2ce2bce26f1003746d773df9a6e0 100644 (file)
@@ -288,7 +288,6 @@ class CRM_Import_Forms extends CRM_Core_Form {
   protected function getDataSourceObject(): ?CRM_Import_DataSource {
     $className = $this->getDataSourceClassName();
     if ($className) {
-      /* @var CRM_Import_DataSource $dataSource */
       return new $className($this->getUserJobID());
     }
     return NULL;
@@ -304,7 +303,7 @@ class CRM_Import_Forms extends CRM_Core_Form {
   protected function getDataSourceFields(): array {
     $className = $this->getDataSourceClassName();
     if ($className) {
-      /* @var CRM_Import_DataSource $dataSourceClass */
+      /** @var CRM_Import_DataSource $dataSourceClass */
       $dataSourceClass = new $className();
       return $dataSourceClass->getSubmittableFields();
     }
index 702bfdcd2b52ab6f20652208706967d0b4f4c6fd..a463aff955aa0efa3fdc401f9e4325910712453e 100644 (file)
@@ -167,7 +167,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
   protected function getDataSourceObject(): ?CRM_Import_DataSource {
     $className = $this->getSubmittedValue('dataSource');
     if ($className) {
-      /* @var CRM_Import_DataSource $dataSource */
       return new $className($this->getUserJobID());
     }
     return NULL;
@@ -1320,7 +1319,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
     if (!isset($fieldSpec['bao'])) {
       return $submittedValue;
     }
-    /* @var \CRM_Core_DAO $bao */
+    /** @var \CRM_Core_DAO $bao */
     $bao = $fieldSpec['bao'];
     // For historical reasons use validate as context - ie disabled name matches ARE permitted.
     $nameOptions = $bao::buildOptions($fieldSpec['name'], 'validate');
@@ -2077,7 +2076,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
         $parserClass = $userJobType['class'];
       }
     }
-    /* @var \CRM_Import_Parser $parser */
+    /** @var \CRM_Import_Parser $parser */
     $parser = new $parserClass();
     $parser->setUserJobID($userJobID);
     // Not sure if we still need to init....
index c53912830e2962f9bbf3dc3e272459e8962fde2c..256fc7e3e7b661c7a6a9a44f536b83673c2bcfb1 100644 (file)
@@ -209,7 +209,7 @@ class CRM_Utils_Check {
     $checksNeeded = $statusNames;
     foreach (glob(__DIR__ . '/Check/Component/*.php') as $filePath) {
       $className = 'CRM_Utils_Check_Component_' . basename($filePath, '.php');
-      /* @var CRM_Utils_Check_Component $component */
+      /** @var CRM_Utils_Check_Component $component */
       $component = new $className();
       if ($includeDisabled || $component->isEnabled()) {
         $messages = array_merge($messages, $component->checkAll($statusNames, $includeDisabled));
index 4a9407f5dbe8f7783b30a9f77c0f6da81415cd4c..603fa3adfc0ae068c6edeea5244c666e99ad8160 100644 (file)
@@ -205,7 +205,7 @@ class CRM_Utils_VersionCheck {
     ];
     foreach ($tables as $daoName => $where) {
       if (class_exists($daoName)) {
-        /* @var \CRM_Core_DAO $dao */
+        /** @var \CRM_Core_DAO $dao */
         $dao = new $daoName();
         if ($where) {
           $dao->whereAdd($where);
index e71e6707e017f649ac23770c4770fbdb71bd2354..07f3c41055134b8b9180350f0323e4c333ceac59 100644 (file)
@@ -37,7 +37,7 @@ class PermissionCheckSubscriber implements EventSubscriberInterface {
    *   API authorization event.
    */
   public function onApiAuthorize(\Civi\API\Event\AuthorizeEvent $event) {
-    /* @var \Civi\Api4\Generic\AbstractAction $apiRequest */
+    /** @var \Civi\Api4\Generic\AbstractAction $apiRequest */
     $apiRequest = $event->getApiRequest();
     if ($apiRequest['version'] == 4) {
       if (!$apiRequest->getCheckPermissions() || $apiRequest->isAuthorized(\CRM_Core_Session::singleton()->getLoggedInContactID())) {
index de08cff0b058039c2504c95c3e813ef761f7670b..1181029118f60d4ed89048987e3b413094c6ee60 100644 (file)
@@ -896,7 +896,7 @@ class Api4SelectQuery {
    */
   private function getBridgeRefs(string $bridgeEntity, string $joinEntity): array {
     $bridges = CoreUtil::getInfoItem($bridgeEntity, 'bridge') ?? [];
-    /* @var \CRM_Core_DAO $bridgeDAO */
+    /** @var \CRM_Core_DAO $bridgeDAO */
     $bridgeDAO = CoreUtil::getInfoItem($bridgeEntity, 'dao');
     $bridgeEntityFields = \Civi\API\Request::create($bridgeEntity, 'get', ['version' => 4, 'checkPermissions' => $this->getCheckPermissions()])->entityFields();
     $bridgeTable = $bridgeDAO::getTableName();
index ce0740035a977ab9c791bfe873ba31dcec4c2279..429ee56acdbc4dd614a037e742cd5885c7f2b853 100644 (file)
@@ -374,7 +374,7 @@ function civicrm_api3_generic_getrefcount($apiRequest) {
   }
   $daoClass = $entityToClassMap[$apiRequest['entity']];
 
-  /* @var $dao CRM_Core_DAO */
+  /** @var CRM_Core_DAO $dao */
   $dao = new $daoClass();
   $dao->id = $apiRequest['params']['id'];
   if ($dao->find(TRUE)) {
index 803f38dce4e4509854108d6b1801f562c4e33e21..ba98d4fa713fe34cd26914c3aa3d9c2ad52039e4 100644 (file)
@@ -111,7 +111,6 @@ function _civicrm_api3_payment_processor_getlist_defaults(&$request) {
  * @throws \CiviCRM_API3_Exception
  */
 function civicrm_api3_payment_processor_pay($params) {
-  /* @var CRM_Core_Payment $processor */
   $processor = Civi\Payment\System::singleton()->getById($params['payment_processor_id']);
   $processor->setPaymentProcessor(civicrm_api3('PaymentProcessor', 'getsingle', ['id' => $params['payment_processor_id']]));
   try {
index 2b96179265d1c7561a6c60e8b3fd2a4267d5bba8..60b1068b19837694d8d2d48057e05648f3bcab87 100644 (file)
@@ -129,7 +129,7 @@ function _civicrm_api3_report_template_getrows($params) {
   ]
   );
 
-  /* @var \CRM_Report_Form $reportInstance */
+  /** @var \CRM_Report_Form $reportInstance */
   $reportInstance = new $class();
   if (!empty($params['instance_id'])) {
     $reportInstance->setID($params['instance_id']);
index 53fa5e03994912d798a6abf5890314d02d10f271..4e650695db3370606cf0ed840896e04966cf6224 100644 (file)
@@ -1774,7 +1774,7 @@ function _civicrm_api3_validate_constraint($fieldValue, $fieldName, $fieldInfo,
   $fieldInfo = [$fieldName => $fieldInfo];
   $params = [$fieldName => $fieldValue];
   _civicrm_api3_validate_fields($entity, NULL, $params, $fieldInfo);
-  /* @var CRM_Core_DAO $dao*/
+  /** @var CRM_Core_DAO $dao */
   $dao = new $daoName();
   $dao->id = $params[$fieldName];
   $dao->selectAdd();
index 62e4815f1cacf158dc243aee4f1243f6966ff2a3..3ac32ea4def56f8c3671fbfbbf1fb0510574443c 100644 (file)
@@ -36,7 +36,7 @@ class SearchKitSubscriber implements EventSubscriberInterface {
    *   API authorization event.
    */
   public function onApiAuthorize(\Civi\API\Event\AuthorizeEvent $event) {
-    /* @var \Civi\Api4\Generic\AbstractAction $apiRequest */
+    /** @var \Civi\Api4\Generic\AbstractAction $apiRequest */
     $apiRequest = $event->getApiRequest();
     if ($apiRequest['version'] == 4 && $apiRequest->getEntityName() === 'SavedSearch') {
       if (\CRM_Core_Permission::check('administer search_kit')) {
index 8d0d2e2271f8c75da8f2254ecc0b345692e74aa6..f8b2bef4424327addaad4c71334a7e32f5b5d52a 100644 (file)
@@ -248,7 +248,7 @@ class Admin {
       }
       // Non-custom DAO entities
       elseif (!empty($entity['dao'])) {
-        /* @var \CRM_Core_DAO $daoClass */
+        /** @var \CRM_Core_DAO $daoClass */
         $daoClass = $entity['dao'];
         $references = $daoClass::getReferenceColumns();
         $fields = array_column($entity['fields'], NULL, 'name');
index e5b46aaf9a0cbeba068d1b57204926db8413847b..19fd01bafad3298c59a1557cf953544261ec0674 100644 (file)
@@ -1379,7 +1379,7 @@ $text
 
     $html = __FUNCTION__ . ' html';
     $text = __FUNCTION__ . ' text';
-    /* @var CRM_Activity_Form_Task_Email $form */
+    /** @var CRM_Activity_Form_Task_Email $form */
     $form = $this->getCaseEmailTaskForm($contactId, [
       'subject' => '',
       'html_message' => $html,
@@ -1447,7 +1447,7 @@ $text
   public function testSendSmsMobilePhoneNumber(): void {
     $sent = $this->createSendSmsTest(TRUE, 2);
     $this->assertEquals(TRUE, $sent[0]);
-    /* @var CiviTestSMSProvider $provider $provider['id']*/
+    /** @var CiviTestSMSProvider $providerObj */
     $providerObj = CRM_SMS_Provider::singleton(['provider_id' => $this->ids['SmsProvider'][0]]);
     $this->assertEquals('text Anthony', $providerObj->getSentMessage());
   }
@@ -1661,7 +1661,7 @@ $text
     $html = __FUNCTION__ . ' html' . '{contact.display_name}';
     $text = __FUNCTION__ . ' text' . '{contact.display_name}';
 
-    /* @var CRM_Contact_Form_Task_Email $form */
+    /** @var CRM_Contact_Form_Task_Email $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_Email', [
       'subject' => $subject,
       'html_message' => $html,
@@ -2658,7 +2658,7 @@ $textValue
   protected function getCaseEmailTaskForm(int $contactId, array $submittedValues): CRM_Case_Form_Task_Email {
     $_REQUEST['cid'] = $contactId;
     $_REQUEST['caseid'] = $this->getCaseID();
-    /* @var CRM_Case_Form_Task_Email $form */
+    /** @var CRM_Case_Form_Task_Email $form */
     $form = $this->getFormObject('CRM_Case_Form_Task_Email', array_merge([
       'to' => $contactId . '::' . 'email@example.com',
       'from_email_address' => 'from@example.com',
@@ -2675,7 +2675,7 @@ $textValue
    */
   protected function getContactEmailTaskForm(int $contactId, array $submittedValues): CRM_Contact_Form_Task_Email {
     $_REQUEST['cid'] = $contactId;
-    /* @var CRM_Contact_Form_Task_Email $form */
+    /** @var CRM_Contact_Form_Task_Email $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_Email', array_merge([
       'to' => $contactId . '::' . 'email@example.com',
       'from_email_address' => 'from@example.com',
index afc06a9c960fc52b788d2a9286528437e8e655fb..d036e466855e5f3f66b435474e6fa84e1abcbc6d 100644 (file)
@@ -392,7 +392,7 @@ class CRM_Activity_Import_Parser_ActivityTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getDataSourceForm(array $submittedValues): CRM_Activity_Import_Form_DataSource {
-    /* @var \CRM_Activity_Import_Form_DataSource $form */
+    /** @var \CRM_Activity_Import_Form_DataSource $form */
     $form = $this->getFormObject('CRM_Activity_Import_Form_DataSource', $submittedValues);
     return $form;
   }
@@ -408,7 +408,7 @@ class CRM_Activity_Import_Parser_ActivityTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getMapFieldForm(array $submittedValues): CRM_Activity_Import_Form_MapField {
-    /* @var \CRM_Activity_Import_Form_MapField $form */
+    /** @var \CRM_Activity_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Activity_Import_Form_MapField', $submittedValues);
     return $form;
   }
@@ -424,7 +424,7 @@ class CRM_Activity_Import_Parser_ActivityTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getPreviewForm(array $submittedValues): CRM_Activity_Import_Form_Preview {
-    /* @var CRM_Activity_Import_Form_Preview $form */
+    /** @var CRM_Activity_Import_Form_Preview $form */
     $form = $this->getFormObject('CRM_Activity_Import_Form_Preview', $submittedValues);
     return $form;
   }
index ff274e8982b9f71d1035046d4fb384f4b3337f40..704643b95cb4712cc3c63a20d5c6b8bc05ed9dee 100644 (file)
@@ -21,7 +21,7 @@ class CRM_Contact_Form_Task_AddToGroupTest extends CiviUnitTestCase {
   protected function getSearchTaskFormObject(array $formValues) {
     $_POST = $formValues;
     $_SERVER['REQUEST_METHOD'] = 'GET';
-    /* @var CRM_Core_Form $form */
+    /** @var CRM_Core_Form $form */
     $form = new CRM_Contact_Form_Task_AddToGroup();
     $form->controller = new CRM_Contact_Controller_Search();
     $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
index 950000e8ccce11c84e8ed3f2da321ae6d7293317..d04ab9032de0a4a9b30a5d9630d7a6830e0b5e50 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Contact_Form_Task_EmailTest extends CiviUnitTestCase {
     }
     $deceasedContactID = $this->individualCreate(['is_deceased' => 1, 'email' => 'dead@example.com']);
     $to[] = $deceasedContactID . '::' . 'dead@example.com';
-    /* @var CRM_Contact_Form_Task_Email $form*/
+    /** @var CRM_Contact_Form_Task_Email $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_Email', [
       'to' => implode(',', $to),
       'subject' => 'Really interesting stuff',
index 9b7974585cf3dc2aeeeef46493a6d4a52be123f3..8c7eb95f8211648751eedd14f99d9a81645032f9 100644 (file)
@@ -132,7 +132,7 @@ class CRM_Contact_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
   protected function getPDFForm(array $formValues, array $contactIDs, ?bool $isLiveMode = TRUE): CRM_Contact_Form_Task_PDF {
     // pretty cludgey.
     $_REQUEST['cid'] = $contactIDs[0];
-    /* @var CRM_Contact_Form_Task_PDF $form */
+    /** @var CRM_Contact_Form_Task_PDF $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_PDF', array_merge([
       'pdf_file_name' => 'pdf_file_name',
       'subject' => 'subject',
index cc35763f43bdd6569e6173d1f4b942230df35fb4..0058747ba336a67a57cf8768de8813b285d739ab 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Contact_Form_Task_PrintDocumentTest extends CiviUnitTestCase {
    */
   public function _testDocumentContent($formValues, $type) {
     $html = [];
-    /* @var CRM_Contact_Form_Task_PDF $form */
+    /** @var CRM_Contact_Form_Task_PDF $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_PDF', [], NULL, [
       'radio_ts' => 'ts_sel',
       'task' => CRM_Member_Task::PDF_LETTER,
index b60dc80bba7b03520d912c536402e8ff55cf0ff2..a19b386d022840d316d7de1c16f7b2af4bee1e8a 100644 (file)
@@ -163,7 +163,7 @@ class CRM_Contact_Import_Form_MapFieldTest extends CiviUnitTestCase {
 
     $dataSource = new CRM_Import_DataSource_SQL($userJobID);
     $null = NULL;
-    /* @var CRM_Contact_Import_Form_MapField $form */
+    /** @var CRM_Contact_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Contact_Import_Form_MapField', $submittedValues);
     $form->set('user_job_id', $userJobID);
     $dataSource->initialize();
index 82de4d30bbbebdafcbe920b19b8fbf5645863f9f..a6c7f606b800c1681f89d4cbfb18f383f961fde1 100644 (file)
@@ -2128,7 +2128,7 @@ class CRM_Contact_Import_Parser_ContactTest extends CiviUnitTestCase {
       'onDuplicate' => CRM_Import_Parser::DUPLICATE_UPDATE,
       'groups' => [],
     ], $submittedValues);
-    /* @var CRM_Contact_Import_Form_DataSource $form */
+    /** @var CRM_Contact_Import_Form_DataSource $form */
     $form = $this->getFormObject('CRM_Contact_Import_Form_DataSource', $submittedValues);
     $values = $_SESSION['_' . $form->controller->_name . '_container']['values'];
 
@@ -2139,13 +2139,13 @@ class CRM_Contact_Import_Parser_ContactTest extends CiviUnitTestCase {
     // This gets reset in DataSource so re-do....
     $_SESSION['_' . $form->controller->_name . '_container']['values'] = $values;
 
-    /* @var CRM_Contact_Import_Form_MapField $form */
+    /** @var CRM_Contact_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Contact_Import_Form_MapField', $submittedValues);
 
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
     $form->postProcess();
-    /* @var CRM_Contact_Import_Form_MapField $form */
+    /** @var CRM_Contact_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Contact_Import_Form_Preview', $submittedValues);
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
@@ -2177,8 +2177,8 @@ class CRM_Contact_Import_Parser_ContactTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    */
   private function validateMultiRowCsv(string $csv, array $mapper, string $field, array $submittedValues = []): void {
-    /* @var CRM_Import_DataSource_CSV $dataSource */
-    /* @var \CRM_Contact_Import_Parser_Contact $parser */
+    /** @var CRM_Import_DataSource_CSV $dataSource */
+    /** @var \CRM_Contact_Import_Parser_Contact $parser */
     [$dataSource, $parser] = $this->getDataSourceAndParser($csv, $mapper, $submittedValues);
     while ($values = $dataSource->getRow()) {
       try {
index 85db0f6d74abc2cd38b6e04a07ea7fe05b9eec21..3cdf3789c330d0c5bc34613246911bb32c79c5c0 100644 (file)
@@ -1137,7 +1137,7 @@ WHERE eft.entity_id = %1 AND ft.to_financial_account_id <> %2";
     $this->enableTaxAndInvoicing();
     $financialType = $this->createFinancialType();
     $financialAccount = $this->addTaxAccountToFinancialType($financialType['id']);
-    /* @var CRM_Contribute_Form_Contribution $form */
+    /** @var CRM_Contribute_Form_Contribution $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution', [
       'total_amount' => $params['total_amount'],
       'financial_type_id' => $financialType['id'],
index 1cf3deac08d2a496e80f06d82c325b26fc956526..8af6aee0d055eb57877a53ef6ccc29e5c20f0fa2 100644 (file)
@@ -394,7 +394,7 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase {
       ];
     }
     $_REQUEST['id'] = $this->ids['Contribution'][0] ?? $this->_contributionId;
-    /* @var CRM_Contribute_Form_AdditionalPayment $form*/
+    /** @var CRM_Contribute_Form_AdditionalPayment $form*/
     $form = $this->getFormObject('CRM_Contribute_Form_AdditionalPayment', $submitParams);
     $form->buildForm();
     $form->postProcess();
index 9f40b4ad9bcc95dd9d59c0466e2e9f283773ae6e..5456f0245acdfa98b6906473536d07a35b9e726a 100644 (file)
@@ -24,7 +24,7 @@ class CRM_Contribute_Form_CancelSubscriptionTest extends CiviUnitTestCase {
   public function testMail(): void {
     $mut = new CiviMailUtils($this, TRUE);
     $this->addContribution();
-    /* @var CRM_Contribute_Form_CancelSubscription $form */
+    /** @var CRM_Contribute_Form_CancelSubscription $form */
     $form = $this->getFormObject('CRM_Contribute_Form_CancelSubscription', ['is_notify' => TRUE]);
     $form->set('crid', $this->getContributionRecurID());
     $form->buildForm();
@@ -65,7 +65,7 @@ class CRM_Contribute_Form_CancelSubscriptionTest extends CiviUnitTestCase {
    */
   public function testCancelSubscriptionForm(): void {
     $this->addContribution();
-    /* @var CRM_Contribute_Form_CancelSubscription $form */
+    /** @var CRM_Contribute_Form_CancelSubscription $form */
     $form = $this->getFormObject('CRM_Contribute_Form_CancelSubscription', ['is_notify' => TRUE]);
     $form->set('crid', $this->getContributionRecurID());
     $form->buildForm();
index ec0c119911aa608a900749f09126454181fe690d..3754804520249efbb96b4d0c4e7dee7392e0cca8 100644 (file)
@@ -57,7 +57,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase {
     // create a contribution page which is later used to make online payment for pending contribution
     $contributionPageID2 = $this->createContributionPage(['payment_processor' => $paymentProcessorID]);
 
-    /* @var CRM_Contribute_Form_Contribution_Confirm $form*/
+    /** @var CRM_Contribute_Form_Contribution_Confirm $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution_Confirm');
     $form->_id = $contributionPageID2;
 
index 35c38386a5b64c9c785908ec20ddbff0dbd6e3ec..77a7181a4f157ff31dd07d9c70ad6e9e750bb8f5 100644 (file)
@@ -2186,7 +2186,7 @@ Paid By: Check',
    * @return \CRM_Contribute_Form_Contribution
    */
   protected function getContributionForm(array $formValues): CRM_Contribute_Form_Contribution {
-    /* @var CRM_Contribute_Form_Contribution $form */
+    /** @var CRM_Contribute_Form_Contribution $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution', $formValues);
     $form->buildForm();
     return $form;
index a409c55ab1b6cc9cbca48a9b2d8bee8583bd87ef..036ca5be90f16d5f892b84e45f59af15b6d830bf 100644 (file)
@@ -80,7 +80,7 @@ class CRM_Contribute_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
       'receive_date' => '2021-02-01 2:21',
       'currency' => 'USD',
     ])['id'];
-    /* @var CRM_Contribute_Form_Task_PDFLetter $form */
+    /** @var CRM_Contribute_Form_Task_PDFLetter $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Task_PDFLetter', [
       'campaign_id' => '',
       'subject' => '',
@@ -208,7 +208,7 @@ class CRM_Contribute_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
       ];
 
       $contributionId = $this->createContribution();
-      /* @var $form CRM_Contribute_Form_Task_PDFLetter */
+      /** @var $form CRM_Contribute_Form_Task_PDFLetter */
       $form = $this->getFormObject('CRM_Contribute_Form_Task_PDFLetter', $formValues);
       $form->setContributionIds([$contributionId]);
       $format = Civi::settings()->get('dateformatFull');
@@ -248,7 +248,7 @@ class CRM_Contribute_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
       'html_message' => '{contact.display_name}',
       'document_type' => 'pdf',
     ];
-    /* @var $form CRM_Contribute_Form_Task_PDFLetter */
+    /** @var $form CRM_Contribute_Form_Task_PDFLetter */
     $form = $this->getFormObject('CRM_Contribute_Form_Task_PDFLetter', $formValues);
     $form->setContributionIds([$this->createContribution()]);
     try {
@@ -282,7 +282,7 @@ class CRM_Contribute_Form_Task_PDFLetterCommonTest extends CiviUnitTestCase {
       $formValues['html_message'] .= "$token : {contribution.$token}\n";
     }
     $formValues['html_message'] .= '{emoji.favourite_emoticon}';
-    /* @var $form CRM_Contribute_Form_Task_PDFLetter */
+    /** @var $form CRM_Contribute_Form_Task_PDFLetter */
     $form = $this->getFormObject('CRM_Contribute_Form_Task_PDFLetter', $formValues);
     $form->setContributionIds([$this->createContribution(array_merge(['campaign_id' => $tokens['campaign_id:label']], $tokens))]);
     try {
@@ -429,7 +429,7 @@ emo
     ]);
     $contributionIDs[] = $contribution['id'];
 
-    /* @var \CRM_Contribute_Form_Task_PDFLetter $form */
+    /** @var \CRM_Contribute_Form_Task_PDFLetter $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Task_PDFLetter', $formValues);
     $form->setContributionIds($contributionIDs);
 
index c37e43b77db249a2a7b99687e835017da009695d..cc8c0e94e3276ca32f6aed76a05a29ce6f3b84a0 100644 (file)
@@ -71,7 +71,7 @@ class CRM_Contribute_Form_TaskTest extends CiviUnitTestCase {
 
     foreach ($fields as $val) {
       // Assert contribIds are returned in a sorted order.
-      /* @var CRM_Contribute_Form_Task $form */
+      /** @var CRM_Contribute_Form_Task $form */
       $form = $this->getFormObject('CRM_Contribute_Form_Task', ['radio_ts' => 'ts_all'], 'Search');
       $form->set(CRM_Utils_Sort::SORT_ORDER, "`{$val}` asc");
       CRM_Contribute_Form_Task::preProcessCommon($form);
index bcf3c81796b7b151976e4e2354f795e8fd4e675d..4dc9aae6a4cd4bf2f454581a35dade853f0919d3 100644 (file)
@@ -24,7 +24,7 @@ class CRM_Contribute_Form_UpdateSubscriptionTest extends CiviUnitTestCase {
   public function testMail(): void {
     $mut = new CiviMailUtils($this, TRUE);
     $this->addContribution();
-    /* @var CRM_Contribute_Form_UpdateSubscription $form */
+    /** @var CRM_Contribute_Form_UpdateSubscription $form */
     $form = $this->getFormObject('CRM_Contribute_Form_UpdateSubscription', ['is_notify' => TRUE]);
     $form->set('crid', $this->getContributionRecurID());
     $form->buildForm();
index f540a47ff5e7c2ff4b5e5d6362fa0f58724070dd..31cf95bd6d5dc37fa22dbbf34b6573f8d9b2510d 100644 (file)
@@ -632,7 +632,7 @@ class CRM_Contribute_Import_Parser_ContributionTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getMapFieldForm(array $submittedValues): CRM_Contribute_Import_Form_MapField {
-    /* @var \CRM_Contribute_Import_Form_MapField $form */
+    /** @var \CRM_Contribute_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Contribute_Import_Form_MapField', $submittedValues);
     return $form;
   }
@@ -648,7 +648,7 @@ class CRM_Contribute_Import_Parser_ContributionTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getPreviewForm(array $submittedValues): CRM_Contribute_Import_Form_Preview {
-    /* @var CRM_Contribute_Import_Form_Preview $form */
+    /** @var CRM_Contribute_Import_Form_Preview $form */
     $form = $this->getFormObject('CRM_Contribute_Import_Form_Preview', $submittedValues);
     return $form;
   }
index 5786a146de383e808dda10cd9ed71ca4ac024d40..3164e416332a256e878fc42ceca23e1e1c178ba0 100644 (file)
@@ -245,7 +245,7 @@ class CRM_Core_DAOTest extends CiviUnitTestCase {
   public function testFindById() {
     $params = $this->sampleContact('Individual', 4);
     $existing_contact = $this->callAPISuccess('Contact', 'create', $params);
-    /* @var CRM_Contact_DAO_Contact $contact */
+    /** @var CRM_Contact_DAO_Contact $contact */
     $contact = CRM_Contact_BAO_Contact::findById($existing_contact['id']);
     $this->assertEquals($existing_contact['id'], $contact->id);
     $deleted_contact_id = $existing_contact['id'];
index b7fcb7427a5dd6d338927c4d58ce502e42f9b95d..644d33f82ac25b5f045797ac3e5d7b6faba2b0d0 100644 (file)
@@ -50,7 +50,7 @@ class CRM_Custom_Import_Parser_ApiTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getDataSourceForm(array $submittedValues): CRM_Custom_Import_Form_DataSource {
-    /* @var \CRM_Custom_Import_Form_DataSource $form */
+    /** @var \CRM_Custom_Import_Form_DataSource $form */
     $form = $this->getFormObject('CRM_Custom_Import_Form_DataSource', $submittedValues);
     return $form;
   }
@@ -66,7 +66,7 @@ class CRM_Custom_Import_Parser_ApiTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getMapFieldForm(array $submittedValues): CRM_Custom_Import_Form_MapField {
-    /* @var \CRM_Custom_Import_Form_MapField $form */
+    /** @var \CRM_Custom_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Custom_Import_Form_MapField', $submittedValues);
     return $form;
   }
@@ -82,7 +82,7 @@ class CRM_Custom_Import_Parser_ApiTest extends CiviUnitTestCase {
    * @noinspection PhpUnnecessaryLocalVariableInspection
    */
   protected function getPreviewForm(array $submittedValues): CRM_Custom_Import_Form_Preview {
-    /* @var CRM_Custom_Import_Form_Preview $form */
+    /** @var CRM_Custom_Import_Form_Preview $form */
     $form = $this->getFormObject('CRM_Custom_Import_Form_Preview', $submittedValues);
     return $form;
   }
index 59fdb82032cce9bcfe82f1f6b56a44fd91856213..f11e7067f6985a8d379da866cfc2e6301e5b1948 100644 (file)
@@ -836,7 +836,7 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase {
     $lineItems = CRM_Price_BAO_LineItem::getLineItemsByContributionID($contribution['id']);
     $this->assertCount(2, $lineItems);
     $participantId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $contribution['id'], 'participant_id', 'contribution_id');
-    /* @var CRM_Event_Form_SelfSvcTransfer $form */
+    /** @var CRM_Event_Form_SelfSvcTransfer $form */
     $form = $this->getFormObject('CRM_Event_Form_SelfSvcTransfer');
     $toContactId = $this->individualCreate();
     $mut = new CiviMailUtils($this);
index cebc6e73ef7cfd397b3e1cb2301445b45b6586f9..66aa257215df2d1db0a400a87fa9a4e01786c54e 100644 (file)
@@ -88,7 +88,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
     $this->setCurrencySeparators($thousandSeparator);
     $mut = new CiviMailUtils($this);
     $paymentProcessorID = $this->processorCreate();
-    /* @var \CRM_Core_Payment_Dummy $processor */
+    /** @var \CRM_Core_Payment_Dummy $processor */
     $processor = Civi\Payment\System::singleton()->getById($paymentProcessorID);
     $processor->setDoDirectPaymentResult(['fee_amount' => 1.67]);
     $params = ['is_monetary' => 1, 'financial_type_id' => 1];
@@ -216,7 +216,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
     // @todo - figure out why this doesn't pass validate financials
     $this->isValidateFinancialsOnPostAssert = FALSE;
     $paymentProcessorID = $this->processorCreate();
-    /* @var \CRM_Core_Payment_Dummy $processor */
+    /** @var \CRM_Core_Payment_Dummy $processor */
     $processor = Civi\Payment\System::singleton()->getById($paymentProcessorID);
     $processor->setDoDirectPaymentResult(['fee_amount' => 1.67]);
     $params = ['is_monetary' => 1, 'financial_type_id' => 1];
@@ -530,7 +530,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
     $this->createJoinedProfile(['entity_table' => 'civicrm_event', 'entity_id' => $event['id']]);
 
     $_REQUEST['id'] = $event['id'];
-    /* @var \CRM_Event_Form_Registration_Confirm $form */
+    /** @var \CRM_Event_Form_Registration_Confirm $form */
     $form = $this->getFormObject('CRM_Event_Form_Registration_Confirm');
     $form->set('params', [[]]);
     $form->set('values', [
@@ -631,7 +631,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase {
     }
 
     $_REQUEST['id'] = $event['id'];
-    /* @var \CRM_Event_Form_Registration_Confirm $form */
+    /** @var \CRM_Event_Form_Registration_Confirm $form */
     $form = $this->getFormObject('CRM_Event_Form_Registration_Confirm');
     $form->set('params', [[]]);
     $form->set('values', [
index 5afe62c87e7ba89fe33297f52db380d685469307..74c1d5a41f471de526c8f99a80adf3f17c6893b3 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Event_Form_Registration_RegisterTest extends CiviUnitTestCase {
    * @return CRM_Event_Form_Registration_Register
    */
   protected function getEventForm(int $eventID): CRM_Event_Form_Registration_Register {
-    /* @var \CRM_Event_Form_Registration_Register $form */
+    /** @var \CRM_Event_Form_Registration_Register $form */
     $form = $this->getFormObject('CRM_Event_Form_Registration_Register');
     $_REQUEST['id'] = $eventID;
     return $form;
index 687582b0942c6d9b90313a3668d6c50aeef142e5..cb7ea1c736c27c950865ee99f778d96768568c7d 100644 (file)
@@ -20,7 +20,7 @@ class CRM_Event_Form_SelfSvcTransferTest extends CiviUnitTestCase {
     $this->addLocationBlockToDomain();
     $this->individualCreate(['email' => 'new@example.org']);
     $mut = new CiviMailUtils($this);
-    /* @var CRM_Event_Form_SelfSvcTransfer $form*/
+    /** @var CRM_Event_Form_SelfSvcTransfer $form*/
     $form = $this->getFormObject('CRM_Event_Form_SelfSvcTransfer', [
       'email' => 'new@example.org',
     ]);
index df4a7503acf3cc659c9ae08b42aca6f4ec14884b..03542d92691236ea55e5d4fa03879aa4cf45e9c7 100644 (file)
@@ -20,7 +20,7 @@ class CRM_Event_Form_SelfSvcUpdateTest extends CiviUnitTestCase {
     $this->addLocationBlockToDomain();
     $this->individualCreate(['email' => 'new@example.org']);
     $mut = new CiviMailUtils($this);
-    /* @var CRM_Event_Form_SelfSvcUpdate $form*/
+    /** @var CRM_Event_Form_SelfSvcUpdate $form */
     $form = $this->getFormObject('CRM_Event_Form_SelfSvcUpdate', [
       'email' => 'new@example.org',
       'action' => 2,
index 5ea633b850173062b09f6a4fd1377c130a6779bd..bff942902fb7e611c14edddc43ea5870ceb1e7b6 100644 (file)
@@ -45,7 +45,7 @@ class CRM_Event_Form_Task_BadgeTest extends CiviUnitTestCase {
     $_REQUEST['context'] = 'view';
     $_REQUEST['id'] = $participantID;
     $_REQUEST['cid'] = $contactID;
-    /* @var CRM_Event_Form_Task_Badge $form */
+    /** @var CRM_Event_Form_Task_Badge $form */
     $form = $this->getFormObject(
       'CRM_Event_Form_Task_Badge',
       ['badge_id' => 1],
index bfb4e3ffa3e45830e5db1aa9b544ad7f8cdb6f43..dda5f5ec24cfe1148f78d136e77f559206c16c42 100644 (file)
@@ -19,7 +19,7 @@ class CRM_Event_Form_Task_BatchTest extends CiviUnitTestCase {
     $participant = $this->callAPISuccessGetSingle('Participant', ['id' => $participantID]);
     $this->assertEquals(2, $participant['participant_status_id']);
 
-    /* @var CRM_Event_Form_Task_Batch $form */
+    /** @var CRM_Event_Form_Task_Batch $form */
     $form = $this->getFormObject('CRM_Event_Form_Task_Batch');
     $form->submit(['field' => [$participantID => ['participant_status_id' => 1, 'custom_' . $field['id'] => ['two' => 1, 'four' => 1]]]]);
 
@@ -42,7 +42,7 @@ class CRM_Event_Form_Task_BatchTest extends CiviUnitTestCase {
     $this->createEventOrder(['source' => 'Online Event Registration', 'is_pay_later' => 1]);
     $participantCancelledStatusID = CRM_Core_PseudoConstant::getKey('CRM_Event_BAO_Participant', 'status_id', 'Cancelled');
 
-    /* @var CRM_Event_Form_Task_Batch $form */
+    /** @var CRM_Event_Form_Task_Batch $form */
     $form = $this->getFormObject('CRM_Event_Form_Task_Batch');
     $form->submit(['field' => [$this->ids['Participant'][0] => ['participant_status' => $participantCancelledStatusID]]]);
 
index 8af60e2d2fc0d7dc03fb1f6b3f47e107341b44cb..c4aa82df2641a94e7d7705b1e56c79fe2b4ed9e2 100644 (file)
@@ -14,7 +14,7 @@ class CRM_Event_Form_Task_RegisterTest extends CiviUnitTestCase {
    * @throws \CRM_Core_Exception
    */
   public function testGet() {
-    /* @var CRM_Event_Form_Task_Register $form */
+    /** @var CRM_Event_Form_Task_Register $form */
     $form = $this->getFormObject('CRM_Event_Form_Task_Register');
     $this->assertEquals(FALSE, $form->_single);
   }
index 70dfa82294df581f1eab2d1d7d57bf06e467ba38..d9623d256427e8ae9d689860fc4b6cdfd3d77229 100644 (file)
@@ -82,7 +82,7 @@ class CRM_Participant_Import_Parser_ParticipantTest extends CiviUnitTestCase {
       'saveMappingName' => 'my mapping',
       'saveMappingDesc' => 'new mapping',
     ], $submittedValues);
-    /* @var \CRM_Event_Import_Form_DataSource $form */
+    /** @var \CRM_Event_Import_Form_DataSource $form */
     $form = $this->getFormObject('CRM_Event_Import_Form_DataSource', $submittedValues);
     $values = $_SESSION['_' . $form->controller->_name . '_container']['values'];
     $form->buildForm();
@@ -91,13 +91,13 @@ class CRM_Participant_Import_Parser_ParticipantTest extends CiviUnitTestCase {
     $_SESSION['_' . $form->controller->_name . '_container']['values'] = $values;
 
     $this->userJobID = $form->getUserJobID();
-    /* @var CRM_Event_Import_Form_MapField $form */
+    /** @var CRM_Event_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Event_Import_Form_MapField', $submittedValues);
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
     $this->assertTrue($form->validate());
     $form->postProcess();
-    /* @var CRM_Event_Import_Form_Preview $form */
+    /** @var CRM_Event_Import_Form_Preview $form */
     $form = $this->getFormObject('CRM_Event_Import_Form_Preview', $submittedValues);
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
index b9c080167ba1c1a93361a18f4e285254156e5fec..7f642e6c5bf2e8b292d05ebf151e506ce9b245e7 100644 (file)
@@ -158,7 +158,7 @@ class CRM_Import_DataSource_CsvTest extends CiviUnitTestCase {
    */
   protected function submitDatasourceForm(string $csvFileName): CRM_Contact_Import_Form_DataSource {
     $_GET['dataSource'] = 'CRM_Import_DataSource_CSV';
-    /* @var CRM_Contact_Import_Form_DataSource $form */
+    /** @var CRM_Contact_Import_Form_DataSource $form */
     $form = $this->getFormObject('CRM_Contact_Import_Form_DataSource', [
       'uploadFile' => [
         'name' => __DIR__ . '/' . $csvFileName,
index 873d39723a1480ce9c0245006deffb63116c6ff7..d8f5bc882dcb71418061162816f8e3374f8fb4b5 100644 (file)
@@ -638,7 +638,7 @@ class CRM_Member_Form_MembershipRenewalTest extends CiviUnitTestCase {
    * @throws \CiviCRM_API3_Exception
    */
   protected function getForm($formValues = [], $mode = 'test'): CRM_Member_Form_MembershipRenewal {
-    /* @var CRM_Member_Form_MembershipRenewal $form */
+    /** @var CRM_Member_Form_MembershipRenewal $form */
     $form = $this->getFormObject('CRM_Member_Form_MembershipRenewal', $formValues);
 
     $form->_bltID = 5;
index 57ca755d7ea6504b8ac0b4e10a7efb24d494563f..cf247bb0274ba9d9381e0e458310f46819909a9f 100644 (file)
@@ -1092,7 +1092,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
    */
   public function testSubmitRecurCompleteInstant(): void {
     $mut = new CiviMailUtils($this, TRUE);
-    /* @var \CRM_Core_Payment_Dummy $processor */
+    /** @var \CRM_Core_Payment_Dummy $processor */
     $processor = Civi\Payment\System::singleton()->getById($this->_paymentProcessorID);
     $processor->setDoDirectPaymentResult([
       'payment_status_id' => 1,
@@ -1307,7 +1307,7 @@ Expires: ',
     if (isset($_REQUEST['cid'])) {
       unset($_REQUEST['cid']);
     }
-    /* @var CRM_Member_Form_Membership $form*/
+    /** @var CRM_Member_Form_Membership $form*/
     $form = $this->getFormObject('CRM_Member_Form_Membership', $formValues);
     $form->preProcess();
     return $form;
@@ -1427,7 +1427,7 @@ Expires: ',
    * @return \CRM_Contribute_Form_Contribution
    */
   protected function getContributionForm(array $formValues): CRM_Contribute_Form_Contribution {
-    /* @var CRM_Contribute_Form_Contribution $form */
+    /** @var CRM_Contribute_Form_Contribution $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution', $formValues);
     $form->buildForm();
     return $form;
index 642f65cd3f847aa8d5385616618879bb6f0814c5..faf5864ac854b8ad1102db6e630e9f0328b47bd9 100644 (file)
@@ -29,7 +29,7 @@ class CRM_Member_Form_Task_LabelTest extends CiviUnitTestCase {
     $tasks = CRM_Member_Task::permissionedTaskTitles(CRM_Core_Permission::EDIT);
     $this->assertArrayHasKey(201, $tasks);
     $membershipID = $this->contactMembershipCreate(['contact_id' => $this->individualCreate()]);
-    /* @var CRM_Member_Form_Task_Label $form */
+    /** @var CRM_Member_Form_Task_Label $form */
     $form = $this->getFormObject('CRM_Member_Form_Task_Label', [
       'task' => 201,
       'radio_ts' => 'ts_sel',
index f762b11286cbde421c072ad46b99e15dfd143567..1d18d0ede28f0c78f72bb9a4c82b5b8f98aa0f4e 100644 (file)
@@ -78,7 +78,7 @@ class CRM_Member_Form_Task_PDFLetterTest extends CiviUnitTestCase {
       }
     }
 
-    /* @var CRM_Member_Form_Task_PDFLetter $form */
+    /** @var CRM_Member_Form_Task_PDFLetter $form */
     $form = $this->getFormObject('CRM_Member_Form_Task_PDFLetter', [
       'subject' => '{contact.first_name} {membership.source}',
       'html_message' => $htmlMessage,
index 8aead2db36c34ef99e89e296126536242a110a57..7c6e54ae5351e916328dba479807aafb88bd0c5d 100644 (file)
@@ -488,7 +488,7 @@ class CRM_Member_Import_Parser_MembershipTest extends CiviUnitTestCase {
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
     $form->postProcess();
-    /* @var CRM_Member_Import_Form_MapField $form */
+    /** @var CRM_Member_Import_Form_MapField $form */
     $form = $this->getFormObject('CRM_Member_Import_Form_Preview', $submittedValues);
     $form->setUserJobID($this->userJobID);
     $form->buildForm();
index 6370d5b9aa21254b1676009b70d863171e5e7143..8d710564d2847d9d9fabd74e1905531a1df82423 100644 (file)
@@ -124,7 +124,7 @@ class CRM_Price_Form_FieldTest extends CiviUnitTestCase {
     $membershipTypeID2 = $this->membershipTypeCreate(['member_of_contact_id' => $this->setupIDs['contact']]);
 
     $priceSetID = $this->callAPISuccess('PriceSet', 'create', ['title' => 'blah', 'extends' => 'CiviMember'])['id'];
-    /* @var \CRM_Price_Form_Field $form */
+    /** @var \CRM_Price_Form_Field $form */
     $form = $this->getFormObject('CRM_Price_Form_Field');
     $_REQUEST['sid'] = $priceSetID;
     $form->preProcess();
index 38c7b1e736dd5a76ee050fccde8beb4915f63d3e..ab7d7c8915d905eae0b5decd53fa5f54d18d74c9 100644 (file)
@@ -3230,7 +3230,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
    */
   public function getFormObject($class, $formValues = [], $pageName = '', $searchFormValues = []) {
     $_POST = $formValues;
-    /* @var CRM_Core_Form $form */
+    /** @var CRM_Core_Form $form */
     $form = new $class();
     $_SERVER['REQUEST_METHOD'] = 'GET';
     switch ($class) {
index 968b216c92ea9a8c801d6b324a6af317f3b22c4e..55e61b01d8446bd9a96b72c6752d5da56fa70c1b 100644 (file)
@@ -3557,7 +3557,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $_REQUEST['id'] = $this->getContributionID();
     $_REQUEST['action'] = 'update';
     // change pending contribution to completed
-    /* @var CRM_Contribute_Form_Contribution $form */
+    /** @var CRM_Contribute_Form_Contribution $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution', [
       'total_amount' => 20,
       'net_amount' => 20,
index 5c3ae3ba5620b5f1ad74b5609cbdba1bb13a0b69..0ada75eac83681e69898204853b78b56f0f58de0 100644 (file)
@@ -506,7 +506,7 @@ class api_v3_LoggingTest extends CiviUnitTestCase {
   public function testTriggerOutput(): void {
     Civi::settings()->set('logging_no_trigger_permission', TRUE);
     Civi::settings()->set('logging', TRUE);
-    /* @var \Civi\Core\SqlTriggers $sqlTriggers */
+    /** @var \Civi\Core\SqlTriggers $sqlTriggers */
     $sqlTriggers = Civi::service('sql_triggers');
     $fileName = $sqlTriggers->getFile();
     $triggerOutPut = file_get_contents($fileName);
index c8386b5789756db12f4849c17e83a32fed1a8640..0788f96b40e975d782a2e1ff08cf067a664acf31 100644 (file)
@@ -209,7 +209,7 @@ class api_v3_MembershipTest extends CiviUnitTestCase {
     $_REQUEST['action'] = 'update';
     $_REQUEST['id'] = $order['id'];
     // Change Payment Status to Completed
-    /* @var CRM_Contribute_Form_Contribution $form */
+    /** @var CRM_Contribute_Form_Contribution $form */
     $form = $this->getFormObject('CRM_Contribute_Form_Contribution', [
       'total_amount' => 150,
       'financial_type_id' => '1',
index 09a92e80fd3e151508327ae74c6e757134f0ec2c..3a1437be22d559ff16f34ebdbf7795d75ad0fb90 100644 (file)
@@ -364,7 +364,6 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
    */
   public function alterReportVarHook($varType, &$var, &$object) {
     if ($varType === 'sql' && $object instanceof CRM_Report_Form_Contribute_Summary) {
-      /* @var CRM_Report_Form $var */
       $from = $var->getVar('_from');
       $from .= ' LEFT JOIN civicrm_financial_type as temp ON temp.id = contribution_civireport.financial_type_id';
       $var->setVar('_from', $from);
index de6d6ce680855c0af7d08a4b5afd6edc60305046..ca63a4b049677a669145ac4be75b78060401e6df 100755 (executable)
@@ -84,15 +84,15 @@ $infoXmls = findCoreInfoXml();
 foreach ($infoXmls as $infoXml) {
   updateXmlFile($infoXml, function (DOMDocument $dom) use ($newVersion) {
     // Update extension version
+    /** @var \DOMNode $tag */
     foreach ($dom->getElementsByTagName('version') as $tag) {
-      /* @var \DOMNode $tag */
       $tag->textContent = $newVersion;
     }
     // Update compatability - set to major version of core
+    /** @var \DOMNode $compat */
     foreach ($dom->getElementsByTagName('compatibility') as $compat) {
-      /* @var \DOMNode $compat */
+      /** @var \DOMNode $tag */
       foreach ($compat->getElementsByTagName('ver') as $tag) {
-        /* @var \DOMNode $tag */
         $tag->textContent = implode('.', array_slice(explode('.', $newVersion), 0, 2));
       }
     }