From 7017b131410cfa259e8fca41200cf28e7093b439 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Mon, 29 Aug 2022 11:30:22 +0100 Subject: [PATCH] PHPDoc comment fixes --- CRM/Campaign/Form/Petition.php | 4 +-- CRM/Campaign/Form/Task/Reserve.php | 2 +- CRM/Campaign/Info.php | 2 +- CRM/Case/Info.php | 2 +- CRM/Contact/BAO/GroupContactCache.php | 2 +- CRM/Core/Controller.php | 2 +- CRM/Extension/Mapper.php | 2 +- .../Form/FrontEndPaymentFormTrait.php | 2 +- CRM/Mailing/PseudoConstant.php | 5 ++-- CRM/Member/Page/Tab.php | 4 +-- CRM/Member/Utils/RelationshipProcessor.php | 2 +- CRM/PCP/BAO/PCP.php | 16 ++++++------ CRM/Report/BAO/Hook.php | 2 +- CRM/Report/BAO/HookInterface.php | 2 +- CRM/Report/Form/Case/Demographics.php | 2 +- CRM/Report/Form/Contact/Detail.php | 2 +- CRM/Report/Form/Contact/LoggingSummary.php | 4 +-- CRM/Report/Form/Contribute/Lybunt.php | 2 +- CRM/Report/Form/Event/IncomeCountSummary.php | 2 +- CRM/Report/Form/Event/ParticipantListing.php | 12 ++++----- CRM/Report/Form/Event/Summary.php | 2 +- CRM/Report/Form/Member/ContributionDetail.php | 2 +- CRM/Report/Form/Member/Summary.php | 2 +- CRM/Report/Form/Pledge/Detail.php | 4 +-- CRM/Report/Utils/Get.php | 25 ++++++++++--------- CRM/Report/Utils/Report.php | 10 ++++---- ext/recaptcha/CRM/Utils/ReCAPTCHA.php | 2 +- 27 files changed, 60 insertions(+), 60 deletions(-) diff --git a/CRM/Campaign/Form/Petition.php b/CRM/Campaign/Form/Petition.php index 021b4785d5..934779f7ed 100644 --- a/CRM/Campaign/Form/Petition.php +++ b/CRM/Campaign/Form/Petition.php @@ -237,9 +237,9 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { /** * Global validation rules for the form. - * @param $fields + * @param array $fields * @param $files - * @param $form + * @param CRM_Core_Form $form * @return array|bool */ public static function formRule($fields, $files, $form) { diff --git a/CRM/Campaign/Form/Task/Reserve.php b/CRM/Campaign/Form/Task/Reserve.php index a1988f6e6e..01cc566f9c 100644 --- a/CRM/Campaign/Form/Task/Reserve.php +++ b/CRM/Campaign/Form/Task/Reserve.php @@ -285,7 +285,7 @@ class CRM_Campaign_Form_Task_Reserve extends CRM_Campaign_Form_Task { } /** - * @param $contactIds + * @param array $contactIds * * @return array */ diff --git a/CRM/Campaign/Info.php b/CRM/Campaign/Info.php index 37986540dd..6727a595d4 100644 --- a/CRM/Campaign/Info.php +++ b/CRM/Campaign/Info.php @@ -139,7 +139,7 @@ class CRM_Campaign_Info extends CRM_Core_Component_Info { /** * add shortcut to Create New. - * @param $shortCuts + * @param array $shortCuts */ public function creatNewShortcut(&$shortCuts) { if (CRM_Core_Permission::check('manage campaign') || diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index 582fdd07e5..d657e50d4e 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -196,7 +196,7 @@ class CRM_Case_Info extends CRM_Core_Component_Info { /** * add shortcut to Create New. - * @param $shortCuts + * @param array $shortCuts */ public function creatNewShortcut(&$shortCuts) { if (CRM_Core_Permission::check('access all cases and activities') || diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 21e606fe2e..015e73b8e0 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -660,7 +660,7 @@ ORDER BY gc.contact_id, g.children * * Do not call this outside of core tested code - it WILL change. * - * @param array[int] $groupIDs + * @param int[] $groupIDs * @param string $temporaryTable * * @throws \API_Exception diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index efad99f432..e26bec36d9 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -819,7 +819,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { } /** - * @param null $url + * @param string|null $url * @param bool $setToReferer */ public function setDestination($url = NULL, $setToReferer = FALSE) { diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index 550091a84e..16a9e19def 100644 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -117,7 +117,7 @@ class CRM_Extension_Mapper { * Given the class, provides extension path. * * - * @param $clazz + * @param string $clazz * * @return string * full path the extension .php file diff --git a/CRM/Financial/Form/FrontEndPaymentFormTrait.php b/CRM/Financial/Form/FrontEndPaymentFormTrait.php index 1012464b68..678aeb238e 100644 --- a/CRM/Financial/Form/FrontEndPaymentFormTrait.php +++ b/CRM/Financial/Form/FrontEndPaymentFormTrait.php @@ -139,7 +139,7 @@ trait CRM_Financial_Form_FrontEndPaymentFormTrait { /** * Assign line items to the template. * - * @param $tplLineItems + * @param array $tplLineItems */ protected function assignLineItemsToTemplate($tplLineItems) { // @todo this should be a hook that invoicing code hooks into rather than a call to it. diff --git a/CRM/Mailing/PseudoConstant.php b/CRM/Mailing/PseudoConstant.php index aab4735437..cd8064400c 100644 --- a/CRM/Mailing/PseudoConstant.php +++ b/CRM/Mailing/PseudoConstant.php @@ -236,9 +236,8 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant { /** * Labels for advanced search against mailing summary. * - * @param $field - * - * @return unknown_type + * @param string $field + * @return array */ public static function &yesNoOptions($field) { static $options; diff --git a/CRM/Member/Page/Tab.php b/CRM/Member/Page/Tab.php index 586be6ed57..5878ff8d1d 100644 --- a/CRM/Member/Page/Tab.php +++ b/CRM/Member/Page/Tab.php @@ -651,8 +651,8 @@ class CRM_Member_Page_Tab extends CRM_Core_Page { * * @param int $memTypeID * membership type ID - * @param int $links - * (reference ) action links + * @param array $links + * (reference) action links */ public static function getPermissionedLinks($memTypeID, &$links) { if (!CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { diff --git a/CRM/Member/Utils/RelationshipProcessor.php b/CRM/Member/Utils/RelationshipProcessor.php index 0279c0a5b6..7021860f31 100644 --- a/CRM/Member/Utils/RelationshipProcessor.php +++ b/CRM/Member/Utils/RelationshipProcessor.php @@ -38,7 +38,7 @@ class CRM_Member_Utils_RelationshipProcessor { /** * CRM_Member_Utils_RelationshipProcessor constructor. * - * @param [int] $contactIDs + * @param int[] $contactIDs * @param bool $active * * @throws \CiviCRM_API3_Exception diff --git a/CRM/PCP/BAO/PCP.php b/CRM/PCP/BAO/PCP.php index f59b1ea386..dcd24511a9 100644 --- a/CRM/PCP/BAO/PCP.php +++ b/CRM/PCP/BAO/PCP.php @@ -642,7 +642,7 @@ WHERE pcp.id = %1 AND cc.contribution_status_id = %2 AND cc.is_test = 0"; * @param string $component * * @throws Exception - * @return null + * @return bool */ public static function sendStatusUpdate($pcpId, $newStatus, $isInitial = FALSE, $component = 'contribute') { $pcpStatusName = CRM_Core_OptionGroup::values("pcp_status", FALSE, FALSE, FALSE, NULL, 'name'); @@ -746,7 +746,7 @@ WHERE pcp.id = %1 AND cc.contribution_status_id = %2 AND cc.is_test = 0"; * Get pcp block is active. * * @param int $pcpId - * @param $component + * @param string $component * * @return int */ @@ -768,7 +768,7 @@ WHERE pcp.id = %1 AND cc.contribution_status_id = %2 AND cc.is_test = 0"; * Get pcp block is enabled for component page. * * @param int $pageId - * @param $component + * @param string $component * * @return string */ @@ -833,7 +833,7 @@ WHERE field_name like 'email%' And is_active = 1 And uf_group_id = %1"; * @param int $pcpId * @param $component * - * @return int + * @return string */ public static function getPcpPageTitle($pcpId, $component) { if ($component == 'contribute') { @@ -859,9 +859,9 @@ WHERE field_name like 'email%' And is_active = 1 And uf_group_id = %1"; * Get pcp block & entity id given pcp id * * @param int $pcpId - * @param $component + * @param string $component * - * @return string + * @return int[] */ public static function getPcpBlockEntityId($pcpId, $component) { $entity_table = self::getPcpEntityTable($component); @@ -884,7 +884,7 @@ WHERE pcp.id = %1"; /** * Get pcp entity table given a component. * - * @param $component + * @param string $component * * @return string */ @@ -931,7 +931,7 @@ INNER JOIN civicrm_uf_group ufgroup * Get owner notification id. * * @param int $component_id - * @param $component + * @param string $component * * @return int */ diff --git a/CRM/Report/BAO/Hook.php b/CRM/Report/BAO/Hook.php index d922a5d689..4a1acf9a8d 100644 --- a/CRM/Report/BAO/Hook.php +++ b/CRM/Report/BAO/Hook.php @@ -65,7 +65,7 @@ class CRM_Report_BAO_Hook { /** * @param $reportObj - * @param $table + * @param string $table * * @return array */ diff --git a/CRM/Report/BAO/HookInterface.php b/CRM/Report/BAO/HookInterface.php index 69f4093a59..72a358b351 100644 --- a/CRM/Report/BAO/HookInterface.php +++ b/CRM/Report/BAO/HookInterface.php @@ -32,7 +32,7 @@ class CRM_Report_BAO_HookInterface { /** * @param $reportObj - * @param $table + * @param string $table * * @return array */ diff --git a/CRM/Report/Form/Case/Demographics.php b/CRM/Report/Form/Case/Demographics.php index bbc42eac26..bba34f5810 100644 --- a/CRM/Report/Form/Case/Demographics.php +++ b/CRM/Report/Form/Case/Demographics.php @@ -422,7 +422,7 @@ where (cg.extends='Contact' OR cg.extends='Individual' OR cg.extends_entity_colu /** * @param string $fname - * @param $val + * @param string $val * * @return null|string */ diff --git a/CRM/Report/Form/Contact/Detail.php b/CRM/Report/Form/Contact/Detail.php index e0a59e9c41..98c7c18925 100644 --- a/CRM/Report/Form/Contact/Detail.php +++ b/CRM/Report/Form/Contact/Detail.php @@ -904,7 +904,7 @@ HERESQL; } /** - * @param $componentRows + * @param array $componentRows */ public function alterComponentDisplay(&$componentRows) { // custom code to alter rows diff --git a/CRM/Report/Form/Contact/LoggingSummary.php b/CRM/Report/Form/Contact/LoggingSummary.php index 8b347fb735..ad6a1903fd 100644 --- a/CRM/Report/Form/Contact/LoggingSummary.php +++ b/CRM/Report/Form/Contact/LoggingSummary.php @@ -328,8 +328,8 @@ LEFT JOIN civicrm_contact altered_by_contact_civireport /** * Add links & hovers to the detailed report. * - * @param $baseQueryCriteria - * @param $row + * @param string $baseQueryCriteria + * @param array $row * * @return mixed */ diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 5ab5423e2e..a8ec850261 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -628,7 +628,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { } /** - * @param $rows + * @param array $rows */ public function buildChart(&$rows) { diff --git a/CRM/Report/Form/Event/IncomeCountSummary.php b/CRM/Report/Form/Event/IncomeCountSummary.php index 68e78f3428..457eb69d7f 100644 --- a/CRM/Report/Form/Event/IncomeCountSummary.php +++ b/CRM/Report/Form/Event/IncomeCountSummary.php @@ -350,7 +350,7 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form { } /** - * @param $rows + * @param array $rows */ public function buildChart(&$rows) { diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 8404338b26..6dfe2a946c 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -546,12 +546,12 @@ ORDER BY cv.label } /** - * @param $rows - * @param $entryFound - * @param $row - * @param int $rowId - * @param $rowNum - * @param $types + * @param array $rows + * @param bool $entryFound + * @param array $row + * @param string $rowId + * @param int $rowNum + * @param array $types * * @return bool */ diff --git a/CRM/Report/Form/Event/Summary.php b/CRM/Report/Form/Event/Summary.php index a6265e6663..edb3b0776a 100644 --- a/CRM/Report/Form/Event/Summary.php +++ b/CRM/Report/Form/Event/Summary.php @@ -340,7 +340,7 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form { } /** - * @param $rows + * @param array $rows */ public function buildChart(&$rows) { $this->_interval = 'events'; diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index 985b55ca5c..7f13f34f4e 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -639,7 +639,7 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { } /** - * @param $rows + * @param array $rows */ public function alterDisplay(&$rows) { // custom code to alter rows diff --git a/CRM/Report/Form/Member/Summary.php b/CRM/Report/Form/Member/Summary.php index 2bacccf5a8..198503f3c2 100644 --- a/CRM/Report/Form/Member/Summary.php +++ b/CRM/Report/Form/Member/Summary.php @@ -442,7 +442,7 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency } /** - * @param $rows + * @param array $rows */ public function buildChart(&$rows) { $graphRows = []; diff --git a/CRM/Report/Form/Pledge/Detail.php b/CRM/Report/Form/Pledge/Detail.php index 0138995bb2..21ca22a036 100644 --- a/CRM/Report/Form/Pledge/Detail.php +++ b/CRM/Report/Form/Pledge/Detail.php @@ -195,9 +195,9 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { * If we are retrieving total paid we need to define the inclusion of pledge_payment. * * @param string $tableName - * @param $tableKey + * @param string $tableKey * @param string $fieldName - * @param $field + * @param array $field * * @return bool|string */ diff --git a/CRM/Report/Utils/Get.php b/CRM/Report/Utils/Get.php index 20127361a1..0bccfb231b 100644 --- a/CRM/Report/Utils/Get.php +++ b/CRM/Report/Utils/Get.php @@ -18,7 +18,8 @@ class CRM_Report_Utils_Get { /** * @param string $name - * @param $type + * @param int $type + * Integer number identifying the data type. * * @return mixed|null */ @@ -36,7 +37,7 @@ class CRM_Report_Utils_Get { /** * @param string $fieldName * @param $field - * @param $defaults + * @param array $defaults * * @return bool */ @@ -83,8 +84,8 @@ class CRM_Report_Utils_Get { /** * @param string $fieldName - * @param $field - * @param $defaults + * @param array $field + * @param array $defaults */ public static function stringParam($fieldName, &$field, &$defaults) { $fieldOP = CRM_Utils_Array::value("{$fieldName}_op", $_GET, 'like'); @@ -123,8 +124,8 @@ class CRM_Report_Utils_Get { /** * @param string $fieldName - * @param $field - * @param $defaults + * @param array $field + * @param array $defaults */ public static function intParam($fieldName, &$field, &$defaults) { $fieldOP = CRM_Utils_Array::value("{$fieldName}_op", $_GET, 'eq'); @@ -185,7 +186,7 @@ class CRM_Report_Utils_Get { } /** - * @param $defaults + * @param array $defaults */ public static function processChart(&$defaults) { $chartType = $_GET["charts"] ?? NULL; @@ -198,8 +199,8 @@ class CRM_Report_Utils_Get { } /** - * @param $fieldGrp - * @param $defaults + * @param array $fieldGrp + * @param array $defaults */ public static function processFilter(&$fieldGrp, &$defaults) { // process only filters for now @@ -228,7 +229,7 @@ class CRM_Report_Utils_Get { /** * unset default filters. - * @param $defaults + * @param array $defaults */ public static function unsetFilters(&$defaults) { static $unsetFlag = TRUE; @@ -276,8 +277,8 @@ class CRM_Report_Utils_Get { } /** - * @param $reportFields - * @param $defaults + * @param array|null $reportFields + * @param array $defaults */ public static function processFields(&$reportFields, &$defaults) { //add filters from url diff --git a/CRM/Report/Utils/Report.php b/CRM/Report/Utils/Report.php index 7e05025016..51a5dad04d 100644 --- a/CRM/Report/Utils/Report.php +++ b/CRM/Report/Utils/Report.php @@ -59,7 +59,7 @@ class CRM_Report_Utils_Report { } /** - * @param $optionVal + * @param string $optionVal * * @return mixed */ @@ -100,7 +100,7 @@ WHERE TRIM(BOTH '/' FROM CONCAT(report_id, '/', name)) = %1"; } /** - * @param $urlValue + * @param string $urlValue * @param string $query * @param bool $absolute * @param int $instanceID @@ -137,7 +137,7 @@ WHERE TRIM(BOTH '/' FROM CONCAT(report_id, '/', name)) = %1"; /** * get instance count for a template. - * @param $optionVal + * @param string $optionVal * * @return int|null|string */ @@ -200,7 +200,7 @@ WHERE inst.report_id = %1"; /** * @param CRM_Core_Form $form - * @param $rows + * @param array $rows */ public static function export2csv(&$form, &$rows) { //Mark as a CSV file. @@ -524,7 +524,7 @@ WHERE inst.report_id = %1"; } /** - * @param $reportUrl + * @param string $reportUrl * * @return mixed */ diff --git a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php index 85e483dd19..cd99e32f73 100644 --- a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php +++ b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php @@ -39,7 +39,7 @@ class CRM_Utils_ReCAPTCHA { /** * Singleton function used to manage this object. * - * @return object + * @return CRM_Utils_ReCAPTCHA */ public static function &singleton() { if (self::$_singleton === NULL) { -- 2.25.1