From 314803dac7ea1982dcfa94b8fd2afdcd7dbb7e58 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 11 Sep 2022 18:27:30 +0100 Subject: [PATCH] [REF] Fix syntax of var docblocks --- CRM/Campaign/BAO/Campaign.php | 2 +- CRM/Contact/BAO/GroupContactCache.php | 2 +- CRM/Core/BAO/UserJob.php | 2 +- CRM/Core/DAO.php | 5 +---- CRM/Core/PseudoConstant.php | 4 ++-- CRM/Dedupe/Merger.php | 2 +- CRM/Financial/BAO/FinancialTypeAccount.php | 2 +- CRM/Import/DataSource.php | 2 +- CRM/Import/Forms.php | 3 +-- CRM/Import/Parser.php | 5 ++--- CRM/Utils/Check.php | 2 +- CRM/Utils/VersionCheck.php | 2 +- .../Event/Subscriber/PermissionCheckSubscriber.php | 2 +- Civi/Api4/Query/Api4SelectQuery.php | 2 +- api/v3/Generic.php | 2 +- api/v3/PaymentProcessor.php | 1 - api/v3/ReportTemplate.php | 2 +- api/v3/utils.php | 2 +- .../Civi/Api4/Event/Subscriber/SearchKitSubscriber.php | 2 +- ext/search_kit/Civi/Search/Admin.php | 2 +- tests/phpunit/CRM/Activity/BAO/ActivityTest.php | 10 +++++----- .../CRM/Activity/Import/Parser/ActivityTest.php | 6 +++--- tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php | 2 +- tests/phpunit/CRM/Contact/Form/Task/EmailTest.php | 2 +- .../CRM/Contact/Form/Task/PDFLetterCommonTest.php | 2 +- .../CRM/Contact/Form/Task/PrintDocumentTest.php | 2 +- tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php | 2 +- .../phpunit/CRM/Contact/Import/Parser/ContactTest.php | 10 +++++----- tests/phpunit/CRM/Contribute/BAO/ContributionTest.php | 2 +- .../CRM/Contribute/Form/AdditionalPaymentTest.php | 2 +- .../CRM/Contribute/Form/CancelSubscriptionTest.php | 4 ++-- .../CRM/Contribute/Form/Contribution/ConfirmTest.php | 2 +- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 2 +- .../CRM/Contribute/Form/Task/PDFLetterCommonTest.php | 10 +++++----- tests/phpunit/CRM/Contribute/Form/TaskTest.php | 2 +- .../CRM/Contribute/Form/UpdateSubscriptionTest.php | 2 +- .../CRM/Contribute/Import/Parser/ContributionTest.php | 4 ++-- tests/phpunit/CRM/Core/DAOTest.php | 2 +- tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php | 6 +++--- tests/phpunit/CRM/Event/Form/ParticipantTest.php | 2 +- .../CRM/Event/Form/Registration/ConfirmTest.php | 8 ++++---- .../CRM/Event/Form/Registration/RegisterTest.php | 2 +- tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php | 2 +- tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php | 2 +- tests/phpunit/CRM/Event/Form/Task/BadgeTest.php | 2 +- tests/phpunit/CRM/Event/Form/Task/BatchTest.php | 4 ++-- tests/phpunit/CRM/Event/Form/Task/RegisterTest.php | 2 +- .../CRM/Event/Import/Parser/ParticipantTest.php | 6 +++--- tests/phpunit/CRM/Import/DataSource/CsvTest.php | 2 +- .../phpunit/CRM/Member/Form/MembershipRenewalTest.php | 2 +- tests/phpunit/CRM/Member/Form/MembershipTest.php | 6 +++--- tests/phpunit/CRM/Member/Form/Task/LabelTest.php | 2 +- tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php | 2 +- .../CRM/Member/Import/Parser/MembershipTest.php | 2 +- tests/phpunit/CRM/Price/Form/FieldTest.php | 2 +- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 +- tests/phpunit/api/v3/ContributionTest.php | 2 +- tests/phpunit/api/v3/LoggingTest.php | 2 +- tests/phpunit/api/v3/MembershipTest.php | 2 +- tests/phpunit/api/v3/ReportTemplateTest.php | 1 - tools/bin/scripts/set-version.php | 6 +++--- 61 files changed, 89 insertions(+), 96 deletions(-) diff --git a/CRM/Campaign/BAO/Campaign.php b/CRM/Campaign/BAO/Campaign.php index e618542b4f..0174f2c5e3 100644 --- a/CRM/Campaign/BAO/Campaign.php +++ b/CRM/Campaign/BAO/Campaign.php @@ -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 */ diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 015e73b8e0..306cfcb553 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -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; diff --git a/CRM/Core/BAO/UserJob.php b/CRM/Core/BAO/UserJob.php index 4cfb1d560b..39acdb3dd5 100644 --- a/CRM/Core/BAO/UserJob.php +++ b/CRM/Core/BAO/UserJob.php @@ -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; diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 8106c36a6c..7d91617501 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -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; } diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 7f6e50531c..4e3b97c0c1 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -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()); diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 5c4df7f318..028e13cde8 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -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(); } } diff --git a/CRM/Financial/BAO/FinancialTypeAccount.php b/CRM/Financial/BAO/FinancialTypeAccount.php index f54d4c0a20..dd3be4a4ef 100644 --- a/CRM/Financial/BAO/FinancialTypeAccount.php +++ b/CRM/Financial/BAO/FinancialTypeAccount.php @@ -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)) { diff --git a/CRM/Import/DataSource.php b/CRM/Import/DataSource.php index bed5e651d8..e592c5a906 100644 --- a/CRM/Import/DataSource.php +++ b/CRM/Import/DataSource.php @@ -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; diff --git a/CRM/Import/Forms.php b/CRM/Import/Forms.php index 3e4130a08f..aeddf0e3bd 100644 --- a/CRM/Import/Forms.php +++ b/CRM/Import/Forms.php @@ -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(); } diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 702bfdcd2b..a463aff955 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -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.... diff --git a/CRM/Utils/Check.php b/CRM/Utils/Check.php index c53912830e..256fc7e3e7 100644 --- a/CRM/Utils/Check.php +++ b/CRM/Utils/Check.php @@ -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)); diff --git a/CRM/Utils/VersionCheck.php b/CRM/Utils/VersionCheck.php index 4a9407f5db..603fa3adfc 100644 --- a/CRM/Utils/VersionCheck.php +++ b/CRM/Utils/VersionCheck.php @@ -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); diff --git a/Civi/Api4/Event/Subscriber/PermissionCheckSubscriber.php b/Civi/Api4/Event/Subscriber/PermissionCheckSubscriber.php index e71e6707e0..07f3c41055 100644 --- a/Civi/Api4/Event/Subscriber/PermissionCheckSubscriber.php +++ b/Civi/Api4/Event/Subscriber/PermissionCheckSubscriber.php @@ -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())) { diff --git a/Civi/Api4/Query/Api4SelectQuery.php b/Civi/Api4/Query/Api4SelectQuery.php index de08cff0b0..1181029118 100644 --- a/Civi/Api4/Query/Api4SelectQuery.php +++ b/Civi/Api4/Query/Api4SelectQuery.php @@ -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(); diff --git a/api/v3/Generic.php b/api/v3/Generic.php index ce0740035a..429ee56acd 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -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)) { diff --git a/api/v3/PaymentProcessor.php b/api/v3/PaymentProcessor.php index 803f38dce4..ba98d4fa71 100644 --- a/api/v3/PaymentProcessor.php +++ b/api/v3/PaymentProcessor.php @@ -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 { diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 2b96179265..60b1068b19 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -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']); diff --git a/api/v3/utils.php b/api/v3/utils.php index 53fa5e0399..4e650695db 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -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(); diff --git a/ext/search_kit/Civi/Api4/Event/Subscriber/SearchKitSubscriber.php b/ext/search_kit/Civi/Api4/Event/Subscriber/SearchKitSubscriber.php index 62e4815f1c..3ac32ea4de 100644 --- a/ext/search_kit/Civi/Api4/Event/Subscriber/SearchKitSubscriber.php +++ b/ext/search_kit/Civi/Api4/Event/Subscriber/SearchKitSubscriber.php @@ -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')) { diff --git a/ext/search_kit/Civi/Search/Admin.php b/ext/search_kit/Civi/Search/Admin.php index 8d0d2e2271..f8b2bef442 100644 --- a/ext/search_kit/Civi/Search/Admin.php +++ b/ext/search_kit/Civi/Search/Admin.php @@ -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'); diff --git a/tests/phpunit/CRM/Activity/BAO/ActivityTest.php b/tests/phpunit/CRM/Activity/BAO/ActivityTest.php index e5b46aaf9a..19fd01bafa 100644 --- a/tests/phpunit/CRM/Activity/BAO/ActivityTest.php +++ b/tests/phpunit/CRM/Activity/BAO/ActivityTest.php @@ -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', diff --git a/tests/phpunit/CRM/Activity/Import/Parser/ActivityTest.php b/tests/phpunit/CRM/Activity/Import/Parser/ActivityTest.php index afc06a9c96..d036e46685 100644 --- a/tests/phpunit/CRM/Activity/Import/Parser/ActivityTest.php +++ b/tests/phpunit/CRM/Activity/Import/Parser/ActivityTest.php @@ -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; } diff --git a/tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php b/tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php index ff274e8982..704643b95c 100644 --- a/tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php +++ b/tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php @@ -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)); diff --git a/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php b/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php index 950000e8cc..d04ab9032d 100644 --- a/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php +++ b/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php @@ -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', diff --git a/tests/phpunit/CRM/Contact/Form/Task/PDFLetterCommonTest.php b/tests/phpunit/CRM/Contact/Form/Task/PDFLetterCommonTest.php index 9b7974585c..8c7eb95f82 100644 --- a/tests/phpunit/CRM/Contact/Form/Task/PDFLetterCommonTest.php +++ b/tests/phpunit/CRM/Contact/Form/Task/PDFLetterCommonTest.php @@ -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', diff --git a/tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php b/tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php index cc35763f43..0058747ba3 100644 --- a/tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php +++ b/tests/phpunit/CRM/Contact/Form/Task/PrintDocumentTest.php @@ -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, diff --git a/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php b/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php index b60dc80bba..a19b386d02 100644 --- a/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php +++ b/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php b/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php index 82de4d30bb..a6c7f606b8 100644 --- a/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php +++ b/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php @@ -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 { diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php index 85db0f6d74..3cdf3789c3 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php @@ -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'], diff --git a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php index 1cf3deac08..8af6aee0d0 100644 --- a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php b/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php index 9f40b4ad9b..5456f0245a 100644 --- a/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/CancelSubscriptionTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php index ec0c119911..3754804520 100644 --- a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php @@ -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; diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 35c38386a5..77a7181a4f 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -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; diff --git a/tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php b/tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php index a409c55ab1..036ca5be90 100644 --- a/tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Task/PDFLetterCommonTest.php @@ -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); diff --git a/tests/phpunit/CRM/Contribute/Form/TaskTest.php b/tests/phpunit/CRM/Contribute/Form/TaskTest.php index c37e43b77d..cc8c0e94e3 100644 --- a/tests/phpunit/CRM/Contribute/Form/TaskTest.php +++ b/tests/phpunit/CRM/Contribute/Form/TaskTest.php @@ -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); diff --git a/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php b/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php index bcf3c81796..4dc9aae6a4 100644 --- a/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/UpdateSubscriptionTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php b/tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php index f540a47ff5..31cf95bd6d 100644 --- a/tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php @@ -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; } diff --git a/tests/phpunit/CRM/Core/DAOTest.php b/tests/phpunit/CRM/Core/DAOTest.php index 5786a146de..3164e41633 100644 --- a/tests/phpunit/CRM/Core/DAOTest.php +++ b/tests/phpunit/CRM/Core/DAOTest.php @@ -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']; diff --git a/tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php b/tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php index b7fcb7427a..644d33f82a 100644 --- a/tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php +++ b/tests/phpunit/CRM/Custom/Import/Parser/ApiTest.php @@ -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; } diff --git a/tests/phpunit/CRM/Event/Form/ParticipantTest.php b/tests/phpunit/CRM/Event/Form/ParticipantTest.php index 59fdb82032..f11e7067f6 100644 --- a/tests/phpunit/CRM/Event/Form/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/Form/ParticipantTest.php @@ -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); diff --git a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php index cebc6e73ef..66aa257215 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php @@ -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', [ diff --git a/tests/phpunit/CRM/Event/Form/Registration/RegisterTest.php b/tests/phpunit/CRM/Event/Form/Registration/RegisterTest.php index 5afe62c87e..74c1d5a41f 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/RegisterTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/RegisterTest.php @@ -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; diff --git a/tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php b/tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php index 687582b094..cb7ea1c736 100644 --- a/tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php +++ b/tests/phpunit/CRM/Event/Form/SelfSvcTransferTest.php @@ -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', ]); diff --git a/tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php b/tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php index df4a7503ac..03542d9269 100644 --- a/tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php +++ b/tests/phpunit/CRM/Event/Form/SelfSvcUpdateTest.php @@ -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, diff --git a/tests/phpunit/CRM/Event/Form/Task/BadgeTest.php b/tests/phpunit/CRM/Event/Form/Task/BadgeTest.php index 5ea633b850..bff942902f 100644 --- a/tests/phpunit/CRM/Event/Form/Task/BadgeTest.php +++ b/tests/phpunit/CRM/Event/Form/Task/BadgeTest.php @@ -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], diff --git a/tests/phpunit/CRM/Event/Form/Task/BatchTest.php b/tests/phpunit/CRM/Event/Form/Task/BatchTest.php index bfb4e3ffa3..dda5f5ec24 100644 --- a/tests/phpunit/CRM/Event/Form/Task/BatchTest.php +++ b/tests/phpunit/CRM/Event/Form/Task/BatchTest.php @@ -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]]]); diff --git a/tests/phpunit/CRM/Event/Form/Task/RegisterTest.php b/tests/phpunit/CRM/Event/Form/Task/RegisterTest.php index 8af60e2d2f..c4aa82df26 100644 --- a/tests/phpunit/CRM/Event/Form/Task/RegisterTest.php +++ b/tests/phpunit/CRM/Event/Form/Task/RegisterTest.php @@ -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); } diff --git a/tests/phpunit/CRM/Event/Import/Parser/ParticipantTest.php b/tests/phpunit/CRM/Event/Import/Parser/ParticipantTest.php index 70dfa82294..d9623d2564 100644 --- a/tests/phpunit/CRM/Event/Import/Parser/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/Import/Parser/ParticipantTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Import/DataSource/CsvTest.php b/tests/phpunit/CRM/Import/DataSource/CsvTest.php index b9c080167b..7f642e6c5b 100644 --- a/tests/phpunit/CRM/Import/DataSource/CsvTest.php +++ b/tests/phpunit/CRM/Import/DataSource/CsvTest.php @@ -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, diff --git a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php index 873d39723a..d8f5bc882d 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php @@ -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; diff --git a/tests/phpunit/CRM/Member/Form/MembershipTest.php b/tests/phpunit/CRM/Member/Form/MembershipTest.php index 57ca755d7e..cf247bb027 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipTest.php @@ -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; diff --git a/tests/phpunit/CRM/Member/Form/Task/LabelTest.php b/tests/phpunit/CRM/Member/Form/Task/LabelTest.php index 642f65cd3f..faf5864ac8 100644 --- a/tests/phpunit/CRM/Member/Form/Task/LabelTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/LabelTest.php @@ -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', diff --git a/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php b/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php index f762b11286..1d18d0ede2 100644 --- a/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php +++ b/tests/phpunit/CRM/Member/Form/Task/PDFLetterTest.php @@ -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, diff --git a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php index 8aead2db36..7c6e54ae53 100644 --- a/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php @@ -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(); diff --git a/tests/phpunit/CRM/Price/Form/FieldTest.php b/tests/phpunit/CRM/Price/Form/FieldTest.php index 6370d5b9aa..8d710564d2 100644 --- a/tests/phpunit/CRM/Price/Form/FieldTest.php +++ b/tests/phpunit/CRM/Price/Form/FieldTest.php @@ -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(); diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 38c7b1e736..ab7d7c8915 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -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) { diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 968b216c92..55e61b01d8 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -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, diff --git a/tests/phpunit/api/v3/LoggingTest.php b/tests/phpunit/api/v3/LoggingTest.php index 5c3ae3ba56..0ada75eac8 100644 --- a/tests/phpunit/api/v3/LoggingTest.php +++ b/tests/phpunit/api/v3/LoggingTest.php @@ -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); diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index c8386b5789..0788f96b40 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -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', diff --git a/tests/phpunit/api/v3/ReportTemplateTest.php b/tests/phpunit/api/v3/ReportTemplateTest.php index 09a92e80fd..3a1437be22 100644 --- a/tests/phpunit/api/v3/ReportTemplateTest.php +++ b/tests/phpunit/api/v3/ReportTemplateTest.php @@ -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); diff --git a/tools/bin/scripts/set-version.php b/tools/bin/scripts/set-version.php index de6d6ce680..ca63a4b049 100755 --- a/tools/bin/scripts/set-version.php +++ b/tools/bin/scripts/set-version.php @@ -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)); } } -- 2.25.1