From 3fd42bb541eaa2861048f1c74b3da537887812b1 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 16 Jan 2022 12:00:50 +0000 Subject: [PATCH] Another set of PHPDoc fixes --- CRM/ACL/BAO/ACLEntityRole.php | 2 +- CRM/Activity/Controller/Search.php | 2 +- CRM/Admin/Form/Job.php | 2 +- CRM/Admin/Form/PaymentProcessor.php | 4 +- CRM/Admin/Form/Preferences/Address.php | 2 +- CRM/Admin/Form/Setting/Localization.php | 2 +- CRM/Admin/Form/Setting/Url.php | 2 +- CRM/Admin/Page/MessageTemplates.php | 4 +- CRM/Badge/BAO/Badge.php | 25 ++++----- CRM/Campaign/Controller/Search.php | 2 +- CRM/Case/BAO/Case.php | 6 +-- CRM/Case/PseudoConstant.php | 2 +- CRM/Case/Selector/Search.php | 2 +- CRM/Case/XMLProcessor/Report.php | 2 +- CRM/Contact/BAO/Contact.php | 18 +++---- CRM/Contact/BAO/Contact/Location.php | 3 +- CRM/Contact/BAO/Contact/Permission.php | 2 +- CRM/Contact/BAO/Contact/Utils.php | 9 ++-- CRM/Contact/BAO/ContactType.php | 4 +- CRM/Contact/BAO/GroupContactCache.php | 2 +- CRM/Contact/BAO/Relationship.php | 4 +- CRM/Contact/BAO/SearchCustom.php | 2 +- CRM/Contact/Form/Contact.php | 2 +- CRM/Contact/Form/Relationship.php | 2 +- CRM/Contact/Form/Task/LabelCommon.php | 4 +- CRM/Contact/Import/Controller.php | 2 +- CRM/Contact/Import/ImportJob.php | 4 +- CRM/Contribute/BAO/Query.php | 2 +- .../Form/ContributionPage/TabHeader.php | 2 +- CRM/Contribute/PseudoConstant.php | 2 +- CRM/Core/BAO/File.php | 10 ++-- CRM/Core/BAO/LocationType.php | 2 +- CRM/Core/BAO/Phone.php | 9 ++-- CRM/Core/BAO/Setting.php | 4 +- CRM/Core/BAO/UFGroup.php | 12 ++--- CRM/Core/Block.php | 2 +- CRM/Core/DAO.php | 3 +- CRM/Core/DAO/AllCoreTables.php | 2 +- CRM/Core/Error.php | 11 ++-- CRM/Core/Form.php | 40 +++++++------- CRM/Core/I18n.php | 6 +-- CRM/Core/I18n/PseudoConstant.php | 2 +- CRM/Core/Permission.php | 2 +- CRM/Core/Reference/Basic.php | 14 ++--- CRM/Core/Report/Excel.php | 4 +- CRM/Core/Transaction.php | 4 +- CRM/Event/BAO/Event.php | 2 +- CRM/Event/Controller/Registration.php | 2 +- CRM/Event/Import/Controller.php | 2 +- CRM/Event/PseudoConstant.php | 27 +++++----- CRM/Group/Controller.php | 2 +- CRM/Mailing/BAO/Mailing.php | 3 +- CRM/Mailing/BAO/MailingJob.php | 9 ++-- CRM/Mailing/Controller/Send.php | 2 +- CRM/SMS/BAO/Provider.php | 4 +- CRM/Upgrade/Controller.php | 2 +- CRM/Utils/Cache/SqlGroup.php | 2 +- CRM/Utils/Chart.php | 16 +++--- CRM/Utils/Check/Message.php | 2 +- CRM/Utils/Date.php | 2 +- CRM/Utils/Migrate/Export.php | 4 +- CRM/Utils/Migrate/ExportJSON.php | 54 +++++++++---------- CRM/Utils/Migrate/Import.php | 38 ++++++------- CRM/Utils/Network.php | 4 +- CRM/Utils/Rule.php | 8 +-- CRM/Utils/String.php | 4 +- CRM/Utils/Weight.php | 17 +++--- Civi/Core/DAO/Event/PostDelete.php | 6 +-- Civi/Core/Format.php | 2 +- Civi/Core/Transaction/Frame.php | 6 +-- api/v3/Attachment.php | 2 +- api/v3/Participant.php | 2 +- 72 files changed, 239 insertions(+), 235 deletions(-) diff --git a/CRM/ACL/BAO/ACLEntityRole.php b/CRM/ACL/BAO/ACLEntityRole.php index fba736ac8a..9b4d58d616 100644 --- a/CRM/ACL/BAO/ACLEntityRole.php +++ b/CRM/ACL/BAO/ACLEntityRole.php @@ -35,7 +35,7 @@ class CRM_ACL_BAO_ACLEntityRole extends CRM_ACL_DAO_ACLEntityRole { /** * @param array $params * - * @return CRM_ACL_DAO_EntityRole + * @return CRM_ACL_BAO_ACLEntityRole */ public static function create(&$params) { return self::writeRecord($params); diff --git a/CRM/Activity/Controller/Search.php b/CRM/Activity/Controller/Search.php index 226305d169..e4938d0187 100644 --- a/CRM/Activity/Controller/Search.php +++ b/CRM/Activity/Controller/Search.php @@ -33,7 +33,7 @@ class CRM_Activity_Controller_Search extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool $modal * @param int|mixed|null $action */ diff --git a/CRM/Admin/Form/Job.php b/CRM/Admin/Form/Job.php index f8e7afc4d8..b1fede1a23 100644 --- a/CRM/Admin/Form/Job.php +++ b/CRM/Admin/Form/Job.php @@ -116,7 +116,7 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form { } /** - * @param $fields + * @param array $fields * * @return array|bool * @throws API_Exception diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index 59cdafb0c4..83ddd79bc9 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -269,7 +269,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { } /** - * @param $fields + * @param array $fields * * @return array|bool */ @@ -297,7 +297,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { /** * @param array $fields * @param array $errors - * @param null $section + * @param string|null $section * * @return bool */ diff --git a/CRM/Admin/Form/Preferences/Address.php b/CRM/Admin/Form/Preferences/Address.php index 3b56db2adb..160c4f4436 100644 --- a/CRM/Admin/Form/Preferences/Address.php +++ b/CRM/Admin/Form/Preferences/Address.php @@ -46,7 +46,7 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { } /** - * @param $fields + * @param array $fields * * @return bool */ diff --git a/CRM/Admin/Form/Setting/Localization.php b/CRM/Admin/Form/Setting/Localization.php index 17a4843f22..4273e9b98f 100644 --- a/CRM/Admin/Form/Setting/Localization.php +++ b/CRM/Admin/Form/Setting/Localization.php @@ -98,7 +98,7 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting { } /** - * @param $fields + * @param array $fields * * @return array|bool */ diff --git a/CRM/Admin/Form/Setting/Url.php b/CRM/Admin/Form/Setting/Url.php index ae9aa93084..85151cbe76 100644 --- a/CRM/Admin/Form/Setting/Url.php +++ b/CRM/Admin/Form/Setting/Url.php @@ -48,7 +48,7 @@ class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting { } /** - * @param $fields + * @param array $fields * * @return array|bool */ diff --git a/CRM/Admin/Page/MessageTemplates.php b/CRM/Admin/Page/MessageTemplates.php index 58f154abda..a2af7ea9ab 100644 --- a/CRM/Admin/Page/MessageTemplates.php +++ b/CRM/Admin/Page/MessageTemplates.php @@ -40,8 +40,8 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { protected $_revertedId; /** - * @param null $title - * @param null $mode + * @param string $title + * @param int $mode */ public function __construct($title = NULL, $mode = NULL) { parent::__construct($title, $mode); diff --git a/CRM/Badge/BAO/Badge.php b/CRM/Badge/BAO/Badge.php index 9d2c61339f..5d1bdcfffd 100644 --- a/CRM/Badge/BAO/Badge.php +++ b/CRM/Badge/BAO/Badge.php @@ -147,7 +147,7 @@ class CRM_Badge_BAO_Badge { } /** - * @param $formattedRow + * @param array $formattedRow */ public function generateLabel($formattedRow) { switch ($formattedRow['labelFormat']) { @@ -164,7 +164,7 @@ class CRM_Badge_BAO_Badge { } /** - * @param $formattedRow + * @param array $formattedRow * @param int $cellspacing */ public function labelCreator(&$formattedRow, $cellspacing = 0) { @@ -349,13 +349,12 @@ class CRM_Badge_BAO_Badge { * * @param string $img * Image url. - * - * @param string $x - * @param string $y - * @param null $w - * @param null $h + * @param string|null $x + * @param string|null $y + * @param int|null $w + * @param int|null $h */ - public function printImage($img, $x = '', $y = '', $w = NULL, $h = NULL) { + public function printImage($img, $x = NULL, $y = NULL, $w = NULL, $h = NULL) { if (!$x) { $x = $this->pdf->GetAbsX(); } @@ -375,12 +374,14 @@ class CRM_Badge_BAO_Badge { } /** - * @param $img + * @param string $img + * Filename * @param int $imgRes - * @param null $w - * @param null $h + * @param int|null $w + * @param int|null $h * - * @return array + * @return int[] + * [width, height] */ public static function getImageProperties($img, $imgRes = 300, $w = NULL, $h = NULL) { $imgsize = getimagesize($img); diff --git a/CRM/Campaign/Controller/Search.php b/CRM/Campaign/Controller/Search.php index 520c3f9442..9f3e6bf26a 100644 --- a/CRM/Campaign/Controller/Search.php +++ b/CRM/Campaign/Controller/Search.php @@ -33,7 +33,7 @@ class CRM_Campaign_Controller_Search extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index bd6ec6eed4..b713dff0c6 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -1515,16 +1515,16 @@ HERESQL; } /** - * @param $groupInfo + * @param array $groupInfo * @param null $sort - * @param null $showLinks + * @param bool $showLinks * @param bool $returnOnlyCount * @param int $offset * @param int $rowCount * * @return array */ - public static function getGlobalContacts(&$groupInfo, $sort = NULL, $showLinks = NULL, $returnOnlyCount = FALSE, $offset = 0, $rowCount = 25) { + public static function getGlobalContacts(&$groupInfo, $sort = NULL, $showLinks = FALSE, $returnOnlyCount = FALSE, $offset = 0, $rowCount = 25) { $globalContacts = []; $settingsProcessor = new CRM_Case_XMLProcessor_Settings(); diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index 43661793d1..f94d74686c 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -26,7 +26,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * * @param string $column * @param bool $onlyActive - * @param null $condition + * @param string|null $condition * @param bool $fresh * * @return array diff --git a/CRM/Case/Selector/Search.php b/CRM/Case/Selector/Search.php index e588e0167c..a0aabae81c 100644 --- a/CRM/Case/Selector/Search.php +++ b/CRM/Case/Selector/Search.php @@ -167,7 +167,7 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base { * - Edit * * @param bool $isDeleted - * @param null $key + * @param string|null $key * * @return array */ diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index 4f4b7c6c20..a0cd56a33f 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -556,7 +556,7 @@ WHERE a.id = %1 /** * @param int $activityTypeID - * @param null $dateFormat + * @param string|null $dateFormat * @param bool $onlyActive * * @return mixed diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index aed3de09f0..0a707dfddd 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -1767,7 +1767,7 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer'); * * This is for the query to use, create the right sql. * - * @param $fields + * @param array $fields * @param int $contactId * Contact id. * @@ -1844,7 +1844,7 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer'); * * @param int $contactId * @param bool $skipDefaultPrimary - * @param null $block + * @param string|null $block * * @return int|NULL * $locationType location_type_id @@ -2106,10 +2106,10 @@ ORDER BY civicrm_email.is_primary DESC"; * Format profile contact parameters. * * @param array $params - * @param $fields - * @param int $contactID - * @param int $ufGroupId - * @param null $ctype + * @param array $fields + * @param int|null $contactID + * @param int|null $ufGroupId + * @param string|null $ctype * @param bool $skipCustom * * @return array @@ -2696,7 +2696,7 @@ LEFT JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id ) * @param string $tableName * Optional tableName if component is custom group. * - * @return int + * @return int|false * total number in database */ public static function getCountComponent($component, $contactId, $tableName = NULL) { @@ -3367,8 +3367,8 @@ LEFT JOIN civicrm_address ON ( civicrm_address.contact_id = civicrm_contact.id ) /** * Get a list of triggers for the contact table. * - * @param $info - * @param null $tableName + * @param array $info + * @param string|null $tableName * * @see http://issues.civicrm.org/jira/browse/CRM-10554 * diff --git a/CRM/Contact/BAO/Contact/Location.php b/CRM/Contact/BAO/Contact/Location.php index 497cf97768..2e3a0fdb99 100644 --- a/CRM/Contact/BAO/Contact/Location.php +++ b/CRM/Contact/BAO/Contact/Location.php @@ -65,8 +65,7 @@ class CRM_Contact_BAO_Contact_Location { * * @param int $id * Id of the contact. - * - * @param null $type + * @param string|null $type * * @return array * tuple of display_name and sms if found, or (null,null) diff --git a/CRM/Contact/BAO/Contact/Permission.php b/CRM/Contact/BAO/Contact/Permission.php index 5143831b6c..0151fed261 100644 --- a/CRM/Contact/BAO/Contact/Permission.php +++ b/CRM/Contact/BAO/Contact/Permission.php @@ -504,7 +504,7 @@ SELECT second_degree_relationship.contact_id_{$second_direction['to']} AS contac /** * @param bool $checkSumValidationResult - * @param null $form + * @param CRM_Core_Form|null $form */ public static function initChecksumAuthSrc($checkSumValidationResult = FALSE, $form = NULL) { $session = CRM_Core_Session::singleton(); diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index 0fb5888400..cf5708942f 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -135,9 +135,8 @@ WHERE id IN ( $idString ) * Life of this checksum in hours/ 'inf' for infinite. * @param string $hash * Contact hash, if sent, prevents a query in inner loop. - * * @param string $entityType - * @param null $hashSize + * @param int|null $hashSize * * @return string * (Underscore separated: $cs, $ts, $live ) @@ -245,9 +244,9 @@ WHERE id IN ( $idString ) * * @param int $contactID * Contact id of the individual. - * @param $employerID + * @param int|string $employerID * (id or name). - * @param null $previousEmployerID + * @param int|null $previousEmployerID * @param bool $newContact * * @throws \API_Exception @@ -258,7 +257,7 @@ WHERE id IN ( $idString ) if (!$employerID) { // This function is not called in core with no organization & should not be // Refs CRM-15368,CRM-15547 - CRM_Core_Error::deprecatedWarning('calling this function with no organization is deprected'); + CRM_Core_Error::deprecatedWarning('calling this function with no organization is deprecated'); return; } if (!is_numeric($employerID)) { diff --git a/CRM/Contact/BAO/ContactType.php b/CRM/Contact/BAO/ContactType.php index f47c901ba3..9204203798 100644 --- a/CRM/Contact/BAO/ContactType.php +++ b/CRM/Contact/BAO/ContactType.php @@ -212,8 +212,8 @@ class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType implements * Retrieve basic type pairs with name as 'built-in name' and 'label' as value. * * @param bool $all - * @param null $typeName - * @param null $delimiter + * @param array|string|null $typeName + * @param string|null $delimiter * * @return array|string * Array of basictypes with name as 'built-in name' and 'label' as value diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index a393da2d45..e32acb047c 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -309,7 +309,7 @@ WHERE id IN ( $groupIDs ) * Remove one or more contacts from the smart group cache. * * @param int|array $cid - * @param null $groupId + * @param int|null $groupId * * @return bool * TRUE if successful. diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index ace3d020aa..41de7787e1 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1701,7 +1701,7 @@ contact_id_a IN ( %1 ) OR contact_id_b IN ( %1 ) AND id IN (" . implode(',', $re /** * Get Current Employer for Contact. * - * @param $contactIds + * @param array $contactIds * Contact Ids. * * @return array @@ -2186,7 +2186,7 @@ AND cc.sort_name LIKE '%$name%'"; /** * Is the inherited relationship invalidated by this relationship change. * - * @param $membershipValues + * @param array $membershipValues * @param array $values * @param int $cid * diff --git a/CRM/Contact/BAO/SearchCustom.php b/CRM/Contact/BAO/SearchCustom.php index 5e4ea3174b..ffdda3ad5c 100644 --- a/CRM/Contact/BAO/SearchCustom.php +++ b/CRM/Contact/BAO/SearchCustom.php @@ -114,7 +114,7 @@ class CRM_Contact_BAO_SearchCustom { } /** - * @param $args + * @param string $args * * @return array */ diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 0da2759780..090aafaa4f 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -1143,7 +1143,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { * * @param array $fields * Fields array which are submitted. - * @param $errors + * @param array $errors * @param int $contactID * Contact id. * @param string $contactType diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index 06d6d09ba1..fae9c92d43 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -473,7 +473,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { } /** - * @param $relationshipList + * @param array $relationshipList * * @return array */ diff --git a/CRM/Contact/Form/Task/LabelCommon.php b/CRM/Contact/Form/Task/LabelCommon.php index 5b7a295e87..c71be6f54d 100644 --- a/CRM/Contact/Form/Task/LabelCommon.php +++ b/CRM/Contact/Form/Task/LabelCommon.php @@ -54,10 +54,10 @@ class CRM_Contact_Form_Task_LabelCommon { /** * Get the rows for the labels. * - * @param $contactIDs + * @param array $contactIDs * @param int $locationTypeID * @param bool $respectDoNotMail - * @param $mergeSameAddress + * @param bool $mergeSameAddress * @param bool $mergeSameHousehold * UNUSED. * diff --git a/CRM/Contact/Import/Controller.php b/CRM/Contact/Import/Controller.php index da72132b1b..7aa08c4aee 100644 --- a/CRM/Contact/Import/Controller.php +++ b/CRM/Contact/Import/Controller.php @@ -19,7 +19,7 @@ class CRM_Contact_Import_Controller extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Contact/Import/ImportJob.php b/CRM/Contact/Import/ImportJob.php index 249bedc76a..7e0bd84c6a 100644 --- a/CRM/Contact/Import/ImportJob.php +++ b/CRM/Contact/Import/ImportJob.php @@ -46,8 +46,8 @@ class CRM_Contact_Import_ImportJob { protected $_parser; /** - * @param null $tableName - * @param null $createSql + * @param string|null $tableName + * @param string|null $createSql * @param bool $createTable * * @throws \CRM_Core_Exception diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index e5aabe2a97..5a762d3f44 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -1088,7 +1088,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { * * Extracted into separate function to improve readability of main select function. * - * @param $query + * @param CRM_Contact_BAO_Query $query */ private static function addSoftCreditFields(&$query) { $includeSoftCredits = self::isSoftCreditOptionEnabled($query->_params); diff --git a/CRM/Contribute/Form/ContributionPage/TabHeader.php b/CRM/Contribute/Form/ContributionPage/TabHeader.php index 94c7dc01d5..c103759321 100644 --- a/CRM/Contribute/Form/ContributionPage/TabHeader.php +++ b/CRM/Contribute/Form/ContributionPage/TabHeader.php @@ -45,7 +45,7 @@ class CRM_Contribute_Form_ContributionPage_TabHeader { /** * @param CRM_Core_Form $form * - * @return array + * @return array|null */ public static function process(&$form) { if ($form->getVar('_id') <= 0) { diff --git a/CRM/Contribute/PseudoConstant.php b/CRM/Contribute/PseudoConstant.php index 86f6388175..cfad6fbb67 100644 --- a/CRM/Contribute/PseudoConstant.php +++ b/CRM/Contribute/PseudoConstant.php @@ -311,7 +311,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant { * Get all the Personal campaign pages. * * - * @param null $pageType + * @param string|null $pageType * @param int $id * * @return array diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index a420f7ac2b..cc880339e4 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -85,15 +85,15 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { } /** - * @param $data + * @param string $data * @param int $fileTypeID - * @param $entityTable + * @param string $entityTable * @param int $entityID - * @param $entitySubtype + * @param string|false $entitySubtype * @param bool $overwrite * @param null|array $fileParams * @param string $uploadName - * @param null $mimeType + * @param string $mimeType * * @throws Exception */ @@ -102,7 +102,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { $fileTypeID, $entityTable, $entityID, - $entitySubtype, + $entitySubtype = FALSE, $overwrite = TRUE, $fileParams = NULL, $uploadName = 'uploadFile', diff --git a/CRM/Core/BAO/LocationType.php b/CRM/Core/BAO/LocationType.php index d7e166dd66..3e25675ce2 100644 --- a/CRM/Core/BAO/LocationType.php +++ b/CRM/Core/BAO/LocationType.php @@ -65,7 +65,7 @@ class CRM_Core_BAO_LocationType extends CRM_Core_DAO_LocationType implements \Ci /** * Retrieve the default location_type. * - * @return object + * @return CRM_Core_DAO_LocationType|null * The default location type object on success, * null otherwise */ diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index ecdeb01fd8..c51b492bba 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -76,9 +76,8 @@ class CRM_Core_BAO_Phone extends CRM_Core_DAO_Phone { * * @param int $id * The contact id. - * * @param bool $updateBlankLocInfo - * @param null $type + * @param string|null $type * @param array $filters * * @return array @@ -149,10 +148,8 @@ ORDER BY civicrm_phone.is_primary DESC, phone_id ASC "; * This is called from CRM_Core_BAO_Block as a calculated function. * * @param array $entityElements - * The array containing entity_id and. - * entity_table name - * - * @param null $type + * The array containing entity_id and entity_table name + * @param string|null $type * * @return array * the array of phone ids which are potential numbers diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index e4c14859e0..ac9b1309b1 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -47,7 +47,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { /** * Retrieve the value of a setting from the DB table. * - * @param string $group + * @param string|null $group * The group name of the item (deprecated). * @param string $name * (required) The name under which this item is stored. @@ -169,7 +169,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @param array $params * (required) An api formatted array of keys and values. - * @param null $domains + * @param array|null $domains * * @throws API_Exception * @domains array an array of domains to get settings for. Default is the current domain diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index f45cae7513..8929445cd9 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -253,7 +253,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { * What action are we doing. * @param int $visibility * Visibility of fields we are interested in. - * @param $searchable + * @param bool $searchable * @param bool $showAll * @param string $restrict * Should we restrict based on a specified profile type. @@ -261,10 +261,8 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { * @param null $ctype * @param int $permissionType * @param string $orderBy - * @param null $orderProfiles - * + * @param bool $orderProfiles * @param bool $eventProfile - * * @return array * The fields that belong to this ufgroup(s) * @@ -275,14 +273,14 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { $register = FALSE, $action = NULL, $visibility = NULL, - $searchable = NULL, + $searchable = FALSE, $showAll = FALSE, $restrict = NULL, $skipPermission = FALSE, $ctype = NULL, $permissionType = CRM_Core_Permission::CREATE, $orderBy = 'field_name', - $orderProfiles = NULL, + $orderProfiles = FALSE, $eventProfile = FALSE ) { if (!is_array($id)) { @@ -3081,7 +3079,7 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) } /** - * setDefault componet specific profile fields. + * setDefault component specific profile fields. * * @param array $fields * Profile fields. diff --git a/CRM/Core/Block.php b/CRM/Core/Block.php index 695e8a6c3f..6816460573 100644 --- a/CRM/Core/Block.php +++ b/CRM/Core/Block.php @@ -426,7 +426,7 @@ class CRM_Core_Block { } /** - * @param $short + * @param array $short * * @return array */ diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 3e4dcba6d2..2d28ec7ffe 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -693,7 +693,8 @@ class CRM_Core_DAO extends DB_DataObject { * we will build the condition only using the whereAdd's. Default is to * build the condition only using the object parameters. * - * * @return mixed Int (No. of rows affected) on success, false on failure, 0 on no data affected + * @return int|false + * Int (No. of rows affected) on success, false on failure, 0 on no data affected */ public function delete($useWhere = FALSE) { $preEvent = new \Civi\Core\DAO\Event\PreDelete($this); diff --git a/CRM/Core/DAO/AllCoreTables.php b/CRM/Core/DAO/AllCoreTables.php index 670ce3e06e..51ffc8f1f3 100644 --- a/CRM/Core/DAO/AllCoreTables.php +++ b/CRM/Core/DAO/AllCoreTables.php @@ -188,7 +188,7 @@ class CRM_Core_DAO_AllCoreTables { * * @param string $baoName * - * @return string|CRM_Core_DAO + * @return string */ public static function getCanonicalClassName($baoName) { return str_replace('_BAO_', '_DAO_', $baoName); diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 6d2c32211d..763a2605d3 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -242,9 +242,9 @@ class CRM_Core_Error extends PEAR_ErrorStack { } /** - * this function is used to return error details + * This function is used to return error details * - * @param $pearError + * @param PEAR_Error $pearError * * @return array $error */ @@ -902,9 +902,8 @@ class CRM_Core_Error extends PEAR_ErrorStack { * * @param string $status * The status message to set. - * - * @param null $redirect - * @param string $title + * @param string|null $redirect + * @param string|null $title */ public static function statusBounce($status, $redirect = NULL, $title = NULL) { $session = CRM_Core_Session::singleton(); @@ -934,7 +933,7 @@ class CRM_Core_Error extends PEAR_ErrorStack { /** * PEAR error-handler which converts errors to exceptions * - * @param $pearError + * @param PEAR_Error $pearError * @throws PEAR_Exception */ public static function exceptionHandler($pearError) { diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 5808968e0b..829085db1a 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -222,7 +222,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * attempt to standardize on the number of variations that we * use of the below form elements * - * @var const string + * @var string */ const ATTR_SPACING = '     '; @@ -291,7 +291,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * * @param object $state * State associated with this form. - * @param \const|\enum|int $action The mode the form is operating in (None/Create/View/Update/Delete) + * @param int $action The mode the form is operating in (None/Create/View/Update/Delete) * @param string $method * The type of http method used (GET/POST). * @param string $name @@ -1296,10 +1296,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * @param string $name - * @param $title - * @param $values + * @param string $title + * @param array $values * @param array $attributes - * @param null $separator + * @param string $separator * @param bool $required * @param array $optionAttributes - Option specific attributes * @@ -1343,10 +1343,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** - * @param int $id - * @param $title + * @param string $id + * @param string $title * @param bool $allowClear - * @param null $required + * @param bool $required * @param array $attributes */ public function addYesNo($id, $title, $allowClear = FALSE, $required = NULL, $attributes = []) { @@ -1366,8 +1366,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * @param int $id - * @param $title - * @param $values + * @param string $title + * @param array $values * @param null $other * @param null $attributes * @param null $required @@ -1938,7 +1938,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** - * @param $elementName + * @param string[]|string $elementName */ public function addUploadElement($elementName) { $uploadNames = $this->get('uploadNames'); @@ -1966,17 +1966,17 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** - * @param $name + * @param string $name * - * @return null + * @return mixed */ public function getVar($name) { return $this->$name ?? NULL; } /** - * @param $name - * @param $value + * @param string $name + * @param mixed $value */ public function setVar($name, $value) { $this->$name = $value; @@ -2084,7 +2084,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * @param string $name * @param string $label * @param bool $required - * @param null $attributes + * @param array $attributes */ public function addDateTime($name, $label, $required = FALSE, $attributes = NULL) { $addTime = ['addTime' => TRUE]; @@ -2104,10 +2104,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * @param string $name * @param string $label * @param bool $required - * @param null $attributes + * @param array $attributes * @param bool $addCurrency * @param string $currencyName - * @param null $defaultCurrency + * @param string $defaultCurrency * @param bool $freezeCurrency * * @return \HTML_QuickForm_Element @@ -2136,7 +2136,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Add currency element to the form. * * @param string $name - * @param null $label + * @param string $label * @param bool $required * @param string $defaultCurrency * @param bool $freezeCurrency @@ -2405,6 +2405,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** + * @return bool */ public function canUseAjaxContactLookups() { if (0 < (civicrm_api3('contact', 'getcount', ['check_permissions' => 1])) && @@ -2412,6 +2413,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { ) { return TRUE; } + return FALSE; } /** diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index e4653d3be7..009a800549 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -532,7 +532,7 @@ class CRM_Core_I18n { /** * Binds a gettext domain, wrapper over bindtextdomain(). * - * @param $key + * @param string $key * Key of the extension (can be 'civicrm', or 'org.example.foo'). * * @return Bool @@ -610,7 +610,7 @@ class CRM_Core_I18n { /** * Is the language written "right-to-left"? * - * @param $language + * @param string $language * Language (for example 'en_US', or 'fr_CA'). * * @return bool @@ -637,7 +637,7 @@ class CRM_Core_I18n { /** * Change the processing language without changing the current user language * - * @param $locale + * @param string $locale * Locale (for example 'en_US', or 'fr_CA'). * True if the domain was changed for an extension. */ diff --git a/CRM/Core/I18n/PseudoConstant.php b/CRM/Core/I18n/PseudoConstant.php index 6c4576b3ba..d9b9341b77 100644 --- a/CRM/Core/I18n/PseudoConstant.php +++ b/CRM/Core/I18n/PseudoConstant.php @@ -53,7 +53,7 @@ class CRM_Core_I18n_PseudoConstant { } /** - * @param $long + * @param string $long * * @return string */ diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 256efae208..aeeb34ff4c 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -255,7 +255,7 @@ class CRM_Core_Permission { /** * @param int $type - * @param null $prefix + * @param string|null $prefix * @param bool $reset * * @return string diff --git a/CRM/Core/Reference/Basic.php b/CRM/Core/Reference/Basic.php index 4e54a1b77d..ab2c309848 100644 --- a/CRM/Core/Reference/Basic.php +++ b/CRM/Core/Reference/Basic.php @@ -13,11 +13,11 @@ class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface { protected $targetKey; /** - * @param $refTable - * @param $refKey + * @param string $refTable + * @param string $refKey * @param string $targetTable * @param string $targetKey - * @param null $refTypeColumn + * @param string|null $refTypeColumn */ public function __construct($refTable, $refKey, $targetTable = NULL, $targetKey = 'id', $refTypeColumn = NULL) { $this->refTable = $refTable; @@ -28,28 +28,28 @@ class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface { } /** - * @return mixed + * @return string */ public function getReferenceTable() { return $this->refTable; } /** - * @return mixed + * @return string */ public function getReferenceKey() { return $this->refKey; } /** - * @return null + * @return string|null */ public function getTypeColumn() { return $this->refTypeColumn; } /** - * @return null + * @return string */ public function getTargetTable() { return $this->targetTable; diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index ef1c396e0c..fece14e2d8 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -109,8 +109,8 @@ class CRM_Core_Report_Excel { /** * @param string $fileName - * @param $header - * @param $rows + * @param string[] $header + * @param array[] $rows * @param null $titleHeader * @param bool $outputHeader */ diff --git a/CRM/Core/Transaction.php b/CRM/Core/Transaction.php index f12c57964a..23c6500bdc 100644 --- a/CRM/Core/Transaction.php +++ b/CRM/Core/Transaction.php @@ -223,12 +223,12 @@ class CRM_Core_Transaction { * * @param int $phase * A constant; one of: self::PHASE_{PRE,POST}_{COMMIT,ROLLBACK}. - * @param string $callback + * @param callable $callback * A PHP callback. * @param mixed $params * Optional values to pass to callback. * See php manual call_user_func_array for details. - * @param int $id + * @param string|int|null $id */ public static function addCallback($phase, $callback, $params = NULL, $id = NULL) { $frame = \Civi\Core\Transaction\Manager::singleton()->getBaseFrame(); diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 6a3fbdfa85..df4f8157a3 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -24,7 +24,7 @@ class CRM_Event_BAO_Event extends CRM_Event_DAO_Event { * @param array $defaults * (reference ) an assoc array to hold the flattened values. * - * @return CRM_Event_DAO_Event + * @return CRM_Event_DAO_Event|null */ public static function retrieve(&$params, &$defaults) { $event = new CRM_Event_DAO_Event(); diff --git a/CRM/Event/Controller/Registration.php b/CRM/Event/Controller/Registration.php index 561d2ed8b8..efba1ee293 100644 --- a/CRM/Event/Controller/Registration.php +++ b/CRM/Event/Controller/Registration.php @@ -17,7 +17,7 @@ class CRM_Event_Controller_Registration extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Event/Import/Controller.php b/CRM/Event/Import/Controller.php index 233b63231e..8d80c0758a 100644 --- a/CRM/Event/Import/Controller.php +++ b/CRM/Event/Import/Controller.php @@ -19,7 +19,7 @@ class CRM_Event_Import_Controller extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Event/PseudoConstant.php b/CRM/Event/PseudoConstant.php index 2ff32e629e..1543f86709 100644 --- a/CRM/Event/PseudoConstant.php +++ b/CRM/Event/PseudoConstant.php @@ -70,14 +70,14 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant { private static $pcPage; /** - * Get all the n events + * Get all events * - * - * @param int $id + * @param int|null $id * @param bool $all - * @param null $condition + * @param string|null $condition + * Optional SQL where condition * - * @return array + * @return array|string|null * array of all events if any */ public static function event($id = NULL, $all = FALSE, $condition = NULL) { @@ -106,16 +106,18 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant { } /** - * Get all the n participant statuses. + * Get all the event participant statuses. * * - * @param int $id - * @param null $cond + * @param int|null $id + * Return the specified participant status, or null to return all + * @param string|null $cond + * Optional SQL where condition * @param string $retColumn * Tells populate() whether to return 'name' (default) or 'label' values. * - * @return array - * array reference of all participant statuses if any + * @return array|string + * array reference of all participant statuses if any, or single value if $id was passed */ public static function &participantStatus($id = NULL, $cond = NULL, $retColumn = 'name') { if (self::$participantStatus === NULL) { @@ -174,7 +176,8 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant { * * * @param int $id - * @param null $cond + * @param string|null $cond + * Optional SQL where condition * * @return array|string * array reference of all participant roles if any @@ -270,7 +273,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant { /** * Flush given pseudoconstant so it can be reread from db - * nex time it's requested. + * next time it's requested. * * * @param bool|string $name pseudoconstant to be flushed diff --git a/CRM/Group/Controller.php b/CRM/Group/Controller.php index 3f54e4078f..7437b4bed5 100644 --- a/CRM/Group/Controller.php +++ b/CRM/Group/Controller.php @@ -21,7 +21,7 @@ class CRM_Group_Controller extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index c51b2e01ad..158d6f0e37 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2684,7 +2684,8 @@ WHERE civicrm_mailing_job.id = %1 } /** - * @param null $mode + * @param string|null $mode + * Either 'sms' or null * * @return bool * @throws Exception diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index 079e773663..8ce0203223 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -61,7 +61,8 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { * Initiate all pending/ready jobs. * * @param array $testParams - * @param string $mode + * @param string|null $mode + * Either 'sms' or null * * @return bool|null */ @@ -208,7 +209,8 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { /** * Post process to determine if the parent job * as well as the mailing is complete after the run. - * @param null $mode + * @param string|null $mode + * Either 'sms' or null */ public static function runJobs_post($mode = NULL) { @@ -282,7 +284,8 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { /** * before we run jobs, we need to split the jobs * @param int $offset - * @param null $mode + * @param string|null $mode + * Either 'sms' or null */ public static function runJobs_pre($offset = 200, $mode = NULL) { $job = new CRM_Mailing_BAO_MailingJob(); diff --git a/CRM/Mailing/Controller/Send.php b/CRM/Mailing/Controller/Send.php index b989372f52..fffeeee171 100644 --- a/CRM/Mailing/Controller/Send.php +++ b/CRM/Mailing/Controller/Send.php @@ -19,7 +19,7 @@ class CRM_Mailing_Controller_Send extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal * diff --git a/CRM/SMS/BAO/Provider.php b/CRM/SMS/BAO/Provider.php index b51398eea6..0c205bc0c3 100644 --- a/CRM/SMS/BAO/Provider.php +++ b/CRM/SMS/BAO/Provider.php @@ -134,8 +134,8 @@ class CRM_SMS_BAO_Provider extends CRM_SMS_DAO_Provider { /** * @param int $providerID - * @param null $returnParam - * @param null $returnDefaultString + * @param string|null $returnParam + * @param string|null $returnDefaultString * * @return mixed */ diff --git a/CRM/Upgrade/Controller.php b/CRM/Upgrade/Controller.php index d794287955..081d99e7b6 100644 --- a/CRM/Upgrade/Controller.php +++ b/CRM/Upgrade/Controller.php @@ -19,7 +19,7 @@ class CRM_Upgrade_Controller extends CRM_Core_Controller { /** * Class constructor. * - * @param null $title + * @param string $title * @param bool|int $action * @param bool $modal */ diff --git a/CRM/Utils/Cache/SqlGroup.php b/CRM/Utils/Cache/SqlGroup.php index 8d0205a8e6..84618bd263 100644 --- a/CRM/Utils/Cache/SqlGroup.php +++ b/CRM/Utils/Cache/SqlGroup.php @@ -185,7 +185,7 @@ class CRM_Utils_Cache_SqlGroup implements CRM_Utils_Cache_Interface { /** * @param string $key - * @param null $default + * @param mixed $default * * @return mixed */ diff --git a/CRM/Utils/Chart.php b/CRM/Utils/Chart.php index 9a5b90a71c..b067d42b79 100644 --- a/CRM/Utils/Chart.php +++ b/CRM/Utils/Chart.php @@ -145,9 +145,9 @@ class CRM_Utils_Chart { } /** - * @param $rows - * @param $chart - * @param $interval + * @param array $rows + * @param string $chart + * @param string $interval * * @return array */ @@ -229,10 +229,10 @@ class CRM_Utils_Chart { } /** - * @param $rows - * @param $chart - * @param $interval - * @param $chartInfo + * @param array $rows + * @param string $chart + * @param array $interval + * @param array $chartInfo * * @return array */ @@ -270,7 +270,7 @@ class CRM_Utils_Chart { /** * @param array $params - * @param $chart + * @param string $chart * * @return array */ diff --git a/CRM/Utils/Check/Message.php b/CRM/Utils/Check/Message.php index e0a7d51d7b..770d14d3ea 100644 --- a/CRM/Utils/Check/Message.php +++ b/CRM/Utils/Check/Message.php @@ -149,7 +149,7 @@ class CRM_Utils_Check_Message { * * @param string $title * Text displayed on the status message as a link or button. - * @param string $confirmation + * @param string|false $confirmation * Optional confirmation message before performing action * @param string $type * Currently supports: api3 or href diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index 6bb7b2327b..45de25d689 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -778,7 +778,7 @@ class CRM_Utils_Date { } /** - * @param null $timeStamp + * @param int|false|null $timeStamp * * @return bool|string */ diff --git a/CRM/Utils/Migrate/Export.php b/CRM/Utils/Migrate/Export.php index 9e88893bd1..60f5724eb2 100644 --- a/CRM/Utils/Migrate/Export.php +++ b/CRM/Utils/Migrate/Export.php @@ -383,7 +383,7 @@ class CRM_Utils_Migrate_Export { /** * @param string $groupName * @param string $daoName - * @param null $sql + * @param string $sql */ public function fetch($groupName, $daoName, $sql = NULL) { $idNameFields = $this->_xml[$groupName]['idNameFields'] ?? NULL; @@ -443,7 +443,7 @@ class CRM_Utils_Migrate_Export { * @param string $objectName * Business-entity/xml-tag name. * @param CRM_Core_DAO $object - * @param $mappedFields + * @param array $mappedFields * * @return array */ diff --git a/CRM/Utils/Migrate/ExportJSON.php b/CRM/Utils/Migrate/ExportJSON.php index a472aa44e6..accde154a0 100644 --- a/CRM/Utils/Migrate/ExportJSON.php +++ b/CRM/Utils/Migrate/ExportJSON.php @@ -127,7 +127,7 @@ class CRM_Utils_Migrate_ExportJSON { } /** - * @param $tables + * @param array $tables */ public function auxTable($tables) { foreach ($tables as $tableName => $daoName) { @@ -139,7 +139,7 @@ class CRM_Utils_Migrate_ExportJSON { } /** - * @param $optionGroupVars + * @param array $optionGroupVars */ public function optionGroup($optionGroupVars) { $names = array_values($optionGroupVars); @@ -168,11 +168,11 @@ WHERE g.name IN ( $nameString ) } /** - * @param $ids + * @param array $ids * @param string $tableName - * @param $fields - * @param $whereField - * @param null $additionalWhereCond + * @param array $fields + * @param string $whereField + * @param string|null $additionalWhereCond */ public function table( &$ids, @@ -201,9 +201,9 @@ SELECT * } /** - * @param $sql + * @param string $sql * @param string $tableName - * @param $fields + * @param array $fields */ public function sql($sql, $tableName, &$fields) { $dao = &CRM_Core_DAO::executeQuery($sql); @@ -223,7 +223,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function contact(&$contactIDs) { $fields = &$this->dbFields('CRM_Contact_DAO_Contact', TRUE); @@ -231,7 +231,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function note(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_Note', TRUE); @@ -239,7 +239,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function phone(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_Phone', TRUE); @@ -247,7 +247,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function email(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_Email', TRUE); @@ -255,7 +255,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function im(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_IM', TRUE); @@ -263,7 +263,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function website(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_Website', TRUE); @@ -271,7 +271,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function address(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_Email', TRUE); @@ -279,7 +279,7 @@ SELECT * } /** - * @param $contactIDs + * @param array $contactIDs */ public function groupContact(&$contactIDs) { $fields = &$this->dbFields('CRM_Contact_DAO_GroupContact', TRUE); @@ -291,7 +291,7 @@ SELECT * * * Parent child group ids are encoded in a text string * - * @param $contactIDs + * @param array $contactIDs */ public function group(&$contactIDs) { // handle groups only once @@ -321,7 +321,7 @@ WHERE contact_id IN ( $ids ) /** * @todo support search builder and custom saved searches - * @param $groupIDs + * @param array $groupIDs */ public function savedSearch(&$groupIDs) { if (empty($groupIDs)) { @@ -341,7 +341,7 @@ WHERE g.id IN ( $idString ) } /** - * @param $contactIDs + * @param array $contactIDs */ public function entityTag(&$contactIDs) { $fields = &$this->dbFields('CRM_Core_DAO_EntityTag', TRUE); @@ -349,7 +349,7 @@ WHERE g.id IN ( $idString ) } /** - * @param $contactIDs + * @param array $contactIDs */ public function tag(&$contactIDs) { // handle tags only once @@ -377,7 +377,7 @@ AND entity_table = 'civicrm_contact' } /** - * @param $contactIDs + * @param array $contactIDs * @param $additionalContacts */ public function relationship(&$contactIDs, &$additionalContacts) { @@ -426,7 +426,7 @@ AND entity_table = 'civicrm_contact' } /** - * @param $contactIDs + * @param array $contactIDs * @param $additionalContacts */ public function activity(&$contactIDs, &$additionalContacts) { @@ -486,7 +486,7 @@ WHERE ac.contact_id IN ( $ids ) /** * @param int $id * @param string $name - * @param $value + * @param array $value */ public function appendValue($id, $name, $value) { if (empty($value)) { @@ -537,8 +537,8 @@ WHERE ac.contact_id IN ( $ids ) } /** - * @param $contactIDs - * @param $additionalContacts + * @param array $contactIDs + * @param array $additionalContacts */ public function addAdditionalContacts($contactIDs, &$additionalContacts) { if (!$this->_discoverContacts) { @@ -556,7 +556,7 @@ WHERE ac.contact_id IN ( $ids ) } /** - * @param $contactIDs + * @param array $contactIDs */ public function export(&$contactIDs) { $chunks = &$this->splitContactIDs($contactIDs); @@ -575,7 +575,7 @@ WHERE ac.contact_id IN ( $ids ) /** * @param string $fileName - * @param null $lastExportTime + * @param string $lastExportTime * @param bool $discoverContacts */ public function run( diff --git a/CRM/Utils/Migrate/Import.php b/CRM/Utils/Migrate/Import.php index aa4b937ef9..33154adbaf 100644 --- a/CRM/Utils/Migrate/Import.php +++ b/CRM/Utils/Migrate/Import.php @@ -76,9 +76,9 @@ class CRM_Utils_Migrate_Import { /** * @param CRM_Core_DAO $dao - * @param $xml + * @param SimpleXMLElement $xml * @param bool $save - * @param null $keyName + * @param string $keyName * * @return bool */ @@ -117,8 +117,8 @@ class CRM_Utils_Migrate_Import { } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function optionGroups(&$xml, &$idMap) { foreach ($xml->OptionGroups as $optionGroupsXML) { @@ -131,8 +131,8 @@ class CRM_Utils_Migrate_Import { } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function optionValues(&$xml, &$idMap) { foreach ($xml->OptionValues as $optionValuesXML) { @@ -159,7 +159,7 @@ WHERE v.option_group_id = %1 } /** - * @param $xml + * @param SimpleXMLElement $xml */ public function relationshipTypes(&$xml) { @@ -172,7 +172,7 @@ WHERE v.option_group_id = %1 } /** - * @param $xml + * @param SimpleXMLElement $xml */ public function contributionTypes(&$xml) { @@ -185,8 +185,8 @@ WHERE v.option_group_id = %1 } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function customGroups(&$xml, &$idMap) { foreach ($xml->CustomGroups as $customGroupsXML) { @@ -327,8 +327,8 @@ AND v.name = %1 } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function customFields(&$xml, &$idMap) { // Re-index by group id so we can build out the custom fields one table @@ -362,7 +362,7 @@ AND v.name = %1 * Returns an option group's ID, given its name. * * @param $groupName - * @param $idMap + * @param array $idMap * * @return int|null */ @@ -379,8 +379,8 @@ AND v.name = %1 } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function profileGroups(&$xml, &$idMap) { foreach ($xml->ProfileGroups as $profileGroupsXML) { @@ -394,8 +394,8 @@ AND v.name = %1 } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap * * @throws CRM_Core_Exception */ @@ -438,8 +438,8 @@ AND f.column_name = %2 } /** - * @param $xml - * @param $idMap + * @param SimpleXMLElement $xml + * @param array $idMap */ public function profileJoins(&$xml, &$idMap) { foreach ($xml->ProfileJoins as $profileJoinsXML) { diff --git a/CRM/Utils/Network.php b/CRM/Utils/Network.php index fea2788711..a9437cba43 100644 --- a/CRM/Utils/Network.php +++ b/CRM/Utils/Network.php @@ -22,8 +22,8 @@ class CRM_Utils_Network { /** * Try connecting to a TCP service; if it fails, retry. Repeat until serverStartupTimeOut elapses. * - * @param $host - * @param $port + * @param string $host + * @param string $port * @param int $serverStartupTimeOut * Seconds. * @param float $interval diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 4e63ec0103..6b6d7e5cd2 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -262,7 +262,7 @@ class CRM_Utils_Rule { /** * @param string $value - * @param null $default + * @param string|null $default * * @return string|null */ @@ -277,7 +277,7 @@ class CRM_Utils_Rule { /** * @param string $value - * @param null $default + * @param string|null $default * * @return string|null */ @@ -860,8 +860,8 @@ class CRM_Utils_Rule { } /** - * @param $value - * @param null $actualElementValue + * @param mixed $value + * @param mixed $actualElementValue * * @return bool */ diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index 1cb1e8cbc2..6ff102bfc3 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -690,10 +690,10 @@ class CRM_Utils_String { * "admin foo" => array(NULL,"admin foo") * "cms:admin foo" => array("cms", "admin foo") * - * @param $delim + * @param string $delim * @param string $string * E.g. "view all contacts". Syntax: "[prefix:]name". - * @param null $defaultPrefix + * @param string|null $defaultPrefix * * @return array * (0 => string|NULL $prefix, 1 => string $value) diff --git a/CRM/Utils/Weight.php b/CRM/Utils/Weight.php index ec0176c614..843115bff3 100644 --- a/CRM/Utils/Weight.php +++ b/CRM/Utils/Weight.php @@ -271,11 +271,12 @@ class CRM_Utils_Weight { * Field => value to be used in the WHERE. * @param string $queryData * Data to be used, dependent on the query type. - * @param null $additionalWhere - * @param string $orderBy + * @param string|null $additionalWhere + * Optional WHERE field. + * @param string|null $orderBy * Optional ORDER BY field. - * - * @param null $groupBy + * @param string|null $groupBy + * Optional GROU{} BY field. * * @return CRM_Core_DAO * objet that holds the results of the query @@ -352,11 +353,11 @@ class CRM_Utils_Weight { } /** - * @param $rows + * @param array $rows * @param string $daoName * @param string $idName - * @param $returnURL - * @param null $filter + * @param string $returnURL + * @param string|null $filter */ public static function addOrder(&$rows, $daoName, $idName, $returnURL, $filter = NULL) { if (empty($rows)) { @@ -497,7 +498,7 @@ class CRM_Utils_Weight { } /** - * @param $url + * @param string $url */ public static function fixOrderOutput($url) { if (empty($_GET['snippet']) || $_GET['snippet'] !== 'json') { diff --git a/Civi/Core/DAO/Event/PostDelete.php b/Civi/Core/DAO/Event/PostDelete.php index ade776ebc9..c8ea247170 100644 --- a/Civi/Core/DAO/Event/PostDelete.php +++ b/Civi/Core/DAO/Event/PostDelete.php @@ -23,13 +23,13 @@ class PostDelete extends \Symfony\Component\EventDispatcher\Event { public $object; /** - * @var mixed + * @var int|false */ public $result; /** - * @param $object - * @param $result + * @param \CRM_Core_DAO $object + * @param int|false $result */ public function __construct($object, $result) { $this->object = $object; diff --git a/Civi/Core/Format.php b/Civi/Core/Format.php index 2ea33946ad..d279bf8d76 100644 --- a/Civi/Core/Format.php +++ b/Civi/Core/Format.php @@ -80,7 +80,7 @@ class Format { * * @param string|float|int $amount * @param string $currency - * @param $locale + * @param string|null $locale * * @return string * diff --git a/Civi/Core/Transaction/Frame.php b/Civi/Core/Transaction/Frame.php index 7dbe7e4a50..a24b611dc9 100644 --- a/Civi/Core/Transaction/Frame.php +++ b/Civi/Core/Transaction/Frame.php @@ -168,11 +168,11 @@ class Frame { * * @param int $phase * A constant; one of: self::PHASE_{PRE,POST}_{COMMIT,ROLLBACK}. - * @param mixed $callback + * @param callable $callback * A PHP callback. - * @param array|NULL $params Optional values to pass to callback. + * @param mixed $params Optional values to pass to callback. * See php manual call_user_func_array for details. - * @param null $id + * @param string|int|null $id */ public function addCallback($phase, $callback, $params = NULL, $id = NULL) { if ($id) { diff --git a/api/v3/Attachment.php b/api/v3/Attachment.php index 8583f0b8c5..3ad4735192 100644 --- a/api/v3/Attachment.php +++ b/api/v3/Attachment.php @@ -199,7 +199,7 @@ function civicrm_api3_attachment_get($params) { /** * Adjust metadata for Attachment delete action. * - * @param $spec + * @param array $spec */ function _civicrm_api3_attachment_delete_spec(&$spec) { unset($spec['id']['api.required']); diff --git a/api/v3/Participant.php b/api/v3/Participant.php index e70bc067cd..d9932b2bb8 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -56,7 +56,7 @@ function civicrm_api3_participant_create($params) { * @todo this should be done in the BAO not the api * * @param array $params - * @param $participant + * @param CRM_Event_BAO_Participant $participant * * @throws \CiviCRM_API3_Exception */ -- 2.25.1