From fa3fdebc3e31c604a323d819fd10cc893ca59d50 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 29 Jan 2022 11:46:55 +0000 Subject: [PATCH] Another set of PHPdoc corrections --- CRM/ACL/BAO/ACLEntityRole.php | 2 +- CRM/Batch/BAO/Batch.php | 2 +- CRM/Campaign/Form/Survey/TabHeader.php | 4 +- CRM/Case/BAO/Case.php | 6 +- CRM/Contact/BAO/Group.php | 14 ++-- CRM/Contact/BAO/GroupOrganization.php | 2 +- CRM/Contribute/Task.php | 2 +- CRM/Core/DAO.php | 4 +- CRM/Core/Form.php | 2 +- CRM/Core/ManagedEntities.php | 2 +- CRM/Core/Menu.php | 4 +- CRM/Dashlet/Page/Blog.php | 2 +- CRM/Dashlet/Page/GettingStarted.php | 2 +- CRM/Event/BAO/ParticipantStatusType.php | 2 +- CRM/Event/Badge/Logo.php | 2 +- CRM/Event/Badge/Logo5395.php | 2 +- CRM/Event/Badge/NameTent.php | 4 +- CRM/Event/Badge/Simple.php | 2 +- CRM/Event/Form/SelfSvcTransfer.php | 2 +- CRM/Extension/Info.php | 2 +- CRM/Financial/BAO/ExportFormat/CSV.php | 2 +- CRM/Financial/BAO/ExportFormat/IIF.php | 4 +- CRM/Financial/BAO/PaymentProcessorType.php | 2 +- .../Form/FrontEndPaymentFormTrait.php | 2 +- CRM/Financial/Form/Payment.php | 4 +- CRM/Mailing/Event/BAO/Bounce.php | 2 +- CRM/Member/Form.php | 2 +- CRM/Member/Form/Membership.php | 2 +- CRM/Report/Form/Campaign/SurveyDetails.php | 4 +- CRM/Utils/Array.php | 4 +- CRM/Utils/Check/Component/Security.php | 2 +- CRM/Utils/ICalendar.php | 2 +- CRM/Utils/Rule.php | 66 +++++++++---------- CRM/Utils/Sort.php | 4 +- CRM/Utils/String.php | 2 +- CRM/Utils/System/Base.php | 2 +- CRM/Utils/System/Drupal8.php | 2 +- CRM/Utils/XML.php | 2 +- 38 files changed, 87 insertions(+), 87 deletions(-) diff --git a/CRM/ACL/BAO/ACLEntityRole.php b/CRM/ACL/BAO/ACLEntityRole.php index 9b4d58d616..9e35298b6f 100644 --- a/CRM/ACL/BAO/ACLEntityRole.php +++ b/CRM/ACL/BAO/ACLEntityRole.php @@ -43,7 +43,7 @@ class CRM_ACL_BAO_ACLEntityRole extends CRM_ACL_DAO_ACLEntityRole { /** * @param array $params - * @param $defaults + * @param array $defaults */ public static function retrieve(&$params, &$defaults) { CRM_Core_DAO::commonRetrieve(__CLASS__, $params, $defaults); diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index 4d68ffdf46..d3bcba1467 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -539,7 +539,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { * calculated total * @param $expected * user-entered total - * @return array + * @return string */ public static function displayTotals($actual, $expected) { $class = 'actual-value'; diff --git a/CRM/Campaign/Form/Survey/TabHeader.php b/CRM/Campaign/Form/Survey/TabHeader.php index 1f924f5ec4..e7bfd2fa56 100644 --- a/CRM/Campaign/Form/Survey/TabHeader.php +++ b/CRM/Campaign/Form/Survey/TabHeader.php @@ -117,7 +117,7 @@ class CRM_Campaign_Form_Survey_TabHeader { } /** - * @param $tabs + * @param array $tabs * * @return int|string */ @@ -142,7 +142,7 @@ class CRM_Campaign_Form_Survey_TabHeader { } /** - * @param $form + * @param CRM_Core_Form $form * * @return int|string */ diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index b713dff0c6..cf705043ee 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -217,7 +217,7 @@ WHERE civicrm_case.id = %1"; } /** - * @param $id + * @param int $id * @return bool */ public static function del($id) { @@ -1118,8 +1118,8 @@ SELECT civicrm_case.id, case_status.label AS case_status, status_id, civicrm_cas /** * Helper function to generate a formatted contact link/name for display in the Case activities tab * - * @param $contactId - * @param $contactName + * @param int $contactId + * @param string $contactName * * @return string */ diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 2fefea28f5..0342416cff 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -1110,12 +1110,12 @@ WHERE id IN $groupIdString * * This is a recursive function filling the $hierarchy parameter. * - * @param $hierarchy - * @param $group - * @param $tree - * @param $titleOnly - * @param $spacer - * @param $level + * @param array $hierarchy + * @param array $group + * @param array $tree + * @param bool $titleOnly + * @param string $spacer + * @param int $level */ private static function buildGroupHierarchy(&$hierarchy, $group, $tree, $titleOnly, $spacer, $level) { $spaces = str_repeat($spacer, $level); @@ -1135,7 +1135,7 @@ WHERE id IN $groupIdString // For performance reasons we use a for loop rather than a foreach. // Metrics for performance in an installation with 2867 groups a foreach // caused the function getGroupsHierarchy with a foreach execution takes - // around 2.2 seoonds (2,200 ms). + // around 2.2 seconds (2,200 ms). // Changing to a for loop execustion takes around 0.02 seconds (20 ms). if (isset($tree[$group['id']]) && is_array($tree[$group['id']])) { for ($i = 0; $i < count($tree[$group['id']]); $i++) { diff --git a/CRM/Contact/BAO/GroupOrganization.php b/CRM/Contact/BAO/GroupOrganization.php index 8bb1622aa8..87c45ab196 100644 --- a/CRM/Contact/BAO/GroupOrganization.php +++ b/CRM/Contact/BAO/GroupOrganization.php @@ -61,7 +61,7 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio /** * @param int $groupID - * @param $defaults + * @param array $defaults */ public static function retrieve($groupID, &$defaults) { $dao = new CRM_Contact_DAO_GroupOrganization(); diff --git a/CRM/Contribute/Task.php b/CRM/Contribute/Task.php index 9f54f2258d..2bc1fcf177 100644 --- a/CRM/Contribute/Task.php +++ b/CRM/Contribute/Task.php @@ -138,7 +138,7 @@ class CRM_Contribute_Task extends CRM_Core_Task { /** * Get links appropriate to the context of the row. * - * @param $row + * @param array $row * * @return array */ diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 2f9809a6c6..5eab8615f8 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1500,9 +1500,9 @@ LIKE %1 * @param string $daoName * Name of the dao object. * @param array $params - * (reference ) an assoc array of name/value pairs. + * (reference) an assoc array of name/value pairs. * @param array $defaults - * (reference ) an assoc array to hold the flattened values. + * (reference) an assoc array to hold the flattened values. * @param array $returnProperities * An assoc array of fields that need to be returned, eg array( 'first_name', 'last_name'). * diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 8ab1c22a08..d3e8a94306 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1574,7 +1574,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Adds a select based on field metadata. * TODO: This could be even more generic and widget type (select in this case) could also be read from metadata * Perhaps a method like $form->bind($name) which would look up all metadata for named field - * @param $name + * @param string $name * Field name to go on the form. * @param array $props * Mix of html attributes and special properties, namely. diff --git a/CRM/Core/ManagedEntities.php b/CRM/Core/ManagedEntities.php index bcf5ea770d..eeb78f947d 100644 --- a/CRM/Core/ManagedEntities.php +++ b/CRM/Core/ManagedEntities.php @@ -539,7 +539,7 @@ class CRM_Core_ManagedEntities { } /** - * @param $declarations + * @param array $declarations * * @return string|bool * string on error, or FALSE diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php index 3dee74910b..c7376b2d34 100644 --- a/CRM/Core/Menu.php +++ b/CRM/Core/Menu.php @@ -453,8 +453,8 @@ class CRM_Core_Menu { } /** - * @param $menu - * @param $path + * @param array $menu + * @param string|int $path */ public static function buildReturnUrl(&$menu, $path) { if (!isset($menu[$path]['return_url'])) { diff --git a/CRM/Dashlet/Page/Blog.php b/CRM/Dashlet/Page/Blog.php index 6c8cd4e7ac..011e140a05 100644 --- a/CRM/Dashlet/Page/Blog.php +++ b/CRM/Dashlet/Page/Blog.php @@ -86,7 +86,7 @@ class CRM_Dashlet_Page_Blog extends CRM_Core_Page { /** * Parse a single rss feed. * - * @param $url + * @param string $url * * @return array|NULL * array of blog items; or NULL if not available diff --git a/CRM/Dashlet/Page/GettingStarted.php b/CRM/Dashlet/Page/GettingStarted.php index c032301c7a..69503748cc 100644 --- a/CRM/Dashlet/Page/GettingStarted.php +++ b/CRM/Dashlet/Page/GettingStarted.php @@ -88,7 +88,7 @@ class CRM_Dashlet_Page_GettingStarted extends CRM_Core_Page { /** * Get html. * - * @param $url + * @param string $url * * @return array|NULL * array of gettingStarted items; or NULL if not available diff --git a/CRM/Event/BAO/ParticipantStatusType.php b/CRM/Event/BAO/ParticipantStatusType.php index d22b54d887..47eae53235 100644 --- a/CRM/Event/BAO/ParticipantStatusType.php +++ b/CRM/Event/BAO/ParticipantStatusType.php @@ -72,7 +72,7 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu /** * @param array $params - * @param $defaults + * @param array $defaults * * @return CRM_Event_DAO_ParticipantStatusType|null */ diff --git a/CRM/Event/Badge/Logo.php b/CRM/Event/Badge/Logo.php index 4ac357ec25..81770157ef 100644 --- a/CRM/Event/Badge/Logo.php +++ b/CRM/Event/Badge/Logo.php @@ -34,7 +34,7 @@ class CRM_Event_Badge_Logo extends CRM_Event_Badge { } /** - * @param $participant + * @param array $participant */ public function generateLabel($participant) { $x = $this->pdf->GetAbsX(); diff --git a/CRM/Event/Badge/Logo5395.php b/CRM/Event/Badge/Logo5395.php index 2343909174..886b302bb7 100644 --- a/CRM/Event/Badge/Logo5395.php +++ b/CRM/Event/Badge/Logo5395.php @@ -34,7 +34,7 @@ class CRM_Event_Badge_Logo5395 extends CRM_Event_Badge { } /** - * @param $participant + * @param array $participant */ public function generateLabel($participant) { $x = $this->pdf->GetAbsX(); diff --git a/CRM/Event/Badge/NameTent.php b/CRM/Event/Badge/NameTent.php index 4c1809a03f..6acb99d2e2 100644 --- a/CRM/Event/Badge/NameTent.php +++ b/CRM/Event/Badge/NameTent.php @@ -56,7 +56,7 @@ class CRM_Event_Badge_NameTent extends CRM_Event_Badge { } /** - * @param $participant + * @param array $participant */ protected function writeOneSide(&$participant) { $this->pdf->SetXY(0, $this->pdf->height / 2); @@ -71,7 +71,7 @@ class CRM_Event_Badge_NameTent extends CRM_Event_Badge { } /** - * @param $participant + * @param array $participant */ public function generateLabel($participant) { $this->writeOneSide($participant); diff --git a/CRM/Event/Badge/Simple.php b/CRM/Event/Badge/Simple.php index fa6da40e6b..5c080e5f91 100644 --- a/CRM/Event/Badge/Simple.php +++ b/CRM/Event/Badge/Simple.php @@ -24,7 +24,7 @@ class CRM_Event_Badge_Simple extends CRM_Event_Badge { /** - * @param $participant + * @param array $participant */ public function generateLabel($participant) { $date = CRM_Utils_Date::customFormat($participant['event_start_date'], "%e %b"); diff --git a/CRM/Event/Form/SelfSvcTransfer.php b/CRM/Event/Form/SelfSvcTransfer.php index e4d52dddd0..15659cfbab 100644 --- a/CRM/Event/Form/SelfSvcTransfer.php +++ b/CRM/Event/Form/SelfSvcTransfer.php @@ -342,7 +342,7 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form { /** * Based on input, create participant row for transferee and send email * - * @param $participant + * @param CRM_Event_BAO_Participant $participant * * @throws \API_Exception * @throws \CRM_Core_Exception diff --git a/CRM/Extension/Info.php b/CRM/Extension/Info.php index 4382427353..8a1fc01793 100644 --- a/CRM/Extension/Info.php +++ b/CRM/Extension/Info.php @@ -98,7 +98,7 @@ class CRM_Extension_Info { /** * Load extension info an XML file. * - * @param $file + * @param string $file * * @throws CRM_Extension_Exception_ParseException * @return CRM_Extension_Info diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 233bffecaf..b8c1db3b0c 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -108,7 +108,7 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat } /** - * @param $export + * @param array $export * * @return string */ diff --git a/CRM/Financial/BAO/ExportFormat/IIF.php b/CRM/Financial/BAO/ExportFormat/IIF.php index bd0f13c8fa..6028c79519 100644 --- a/CRM/Financial/BAO/ExportFormat/IIF.php +++ b/CRM/Financial/BAO/ExportFormat/IIF.php @@ -75,7 +75,7 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat } /** - * @param $out + * @param string $out * * @return string */ @@ -144,7 +144,7 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat } /** - * @param $export + * @param array $export */ public function makeExport($export) { // Keep running list of accounts and contacts used in this batch, since we need to diff --git a/CRM/Financial/BAO/PaymentProcessorType.php b/CRM/Financial/BAO/PaymentProcessorType.php index c44f71e820..62f4cd44a0 100644 --- a/CRM/Financial/BAO/PaymentProcessorType.php +++ b/CRM/Financial/BAO/PaymentProcessorType.php @@ -184,7 +184,7 @@ WHERE pp.payment_processor_type_id = ppt.id AND ppt.id = %1"; } /** - * @param $attr + * @param string $attr * * @return array */ diff --git a/CRM/Financial/Form/FrontEndPaymentFormTrait.php b/CRM/Financial/Form/FrontEndPaymentFormTrait.php index dbf787e27d..4ae5d30bac 100644 --- a/CRM/Financial/Form/FrontEndPaymentFormTrait.php +++ b/CRM/Financial/Form/FrontEndPaymentFormTrait.php @@ -110,7 +110,7 @@ trait CRM_Financial_Form_FrontEndPaymentFormTrait { * This is an early cut of what will ideally eventually be a hooklike call to the * CRM_Invoicing_Utils class with a potential end goal of moving this handling to an extension. * - * @param $tplLineItems + * @param array $tplLineItems */ protected function alterLineItemsForTemplate(&$tplLineItems) { if (!CRM_Invoicing_Utils::isInvoicingEnabled()) { diff --git a/CRM/Financial/Form/Payment.php b/CRM/Financial/Form/Payment.php index 09bd75851b..e1937e149b 100644 --- a/CRM/Financial/Form/Payment.php +++ b/CRM/Financial/Form/Payment.php @@ -130,7 +130,7 @@ class CRM_Financial_Form_Payment extends CRM_Core_Form { * We add the icons based on these css names which are lower cased * and only AlphaNumeric (+ _). * - * @param $key + * @param string $key * * @return string */ @@ -148,7 +148,7 @@ class CRM_Financial_Form_Payment extends CRM_Core_Form { * We do a strotolower comparison as we don't know what case people might have if they * are using a non-std one like dinersclub. * - * @param $key + * @param string $key * * Based on http://davidwalsh.name/validate-credit-cards * See also https://en.wikipedia.org/wiki/Credit_card_numbers diff --git a/CRM/Mailing/Event/BAO/Bounce.php b/CRM/Mailing/Event/BAO/Bounce.php index 023ca05aba..cc78d62638 100644 --- a/CRM/Mailing/Event/BAO/Bounce.php +++ b/CRM/Mailing/Event/BAO/Bounce.php @@ -19,7 +19,7 @@ class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce { /** * Create a new bounce event, update the email address if necessary * - * @param $params + * @param array $params * * @return bool|null */ diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index 9ec7b8be7a..a8ffd62a2a 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -99,7 +99,7 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { /** * Add to the status message. * - * @param $message + * @param string $message */ protected function addStatusMessage($message) { $this->statusMessage[] = $message; diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 8654b6aa83..9766a5e3d5 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1518,7 +1518,7 @@ DESC limit 1"); /** * Get status message for create action. * - * @return array|string + * @return string * @throws \CiviCRM_API3_Exception */ protected function getStatusMessageForCreate(): string { diff --git a/CRM/Report/Form/Campaign/SurveyDetails.php b/CRM/Report/Form/Campaign/SurveyDetails.php index b7a34aec01..32ccc01804 100644 --- a/CRM/Report/Form/Campaign/SurveyDetails.php +++ b/CRM/Report/Form/Campaign/SurveyDetails.php @@ -493,7 +493,7 @@ INNER JOIN civicrm_option_value val ON ( val.option_group_id = survey.result_id } /** - * @param $rows + * @param array $rows */ private function _formatSurveyResult(&$rows) { $surveyIds = $this->_params['survey_id_value'] ?? NULL; @@ -544,7 +544,7 @@ INNER JOIN civicrm_survey survey ON ( survey.result_id = grp.id ) } /** - * @param $rows + * @param array $rows */ private function _formatSurveyResponseData(&$rows) { $surveyIds = $this->_params['survey_id_value'] ?? NULL; diff --git a/CRM/Utils/Array.php b/CRM/Utils/Array.php index a4778fe286..627e27d0c1 100644 --- a/CRM/Utils/Array.php +++ b/CRM/Utils/Array.php @@ -109,8 +109,8 @@ class CRM_Utils_Array { /** * Recursively searches through a given array for all matches * - * @param $collection - * @param $predicate + * @param array|null $collection + * @param array|callable|string $predicate * @return array */ public static function findAll($collection, $predicate) { diff --git a/CRM/Utils/Check/Component/Security.php b/CRM/Utils/Check/Component/Security.php index 2036e1b015..e6ce5a0709 100644 --- a/CRM/Utils/Check/Component/Security.php +++ b/CRM/Utils/Check/Component/Security.php @@ -362,7 +362,7 @@ class CRM_Utils_Check_Component_Security extends CRM_Utils_Check_Component { } /** - * @param $topic + * @param string $topic * * @return string */ diff --git a/CRM/Utils/ICalendar.php b/CRM/Utils/ICalendar.php index 3e2d0a84e3..7eee09c9eb 100644 --- a/CRM/Utils/ICalendar.php +++ b/CRM/Utils/ICalendar.php @@ -61,7 +61,7 @@ class CRM_Utils_ICalendar { /** * Escape date elements for safe ICalendar use. * - * @param $date + * @param string $date * Date to escape. * * @param bool $gdata diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 6b6d7e5cd2..79004f5ec1 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -23,7 +23,7 @@ require_once 'HTML/QuickForm/Rule/Email.php'; class CRM_Utils_Rule { /** - * @param $str + * @param string|null $str * @param int $maxLength * * @return bool @@ -44,7 +44,7 @@ class CRM_Utils_Rule { } /** - * @param $str + * @param string|null $str * * @return bool */ @@ -53,7 +53,7 @@ class CRM_Utils_Rule { } /** - * @param $str + * @param string|null $str * * @return bool */ @@ -74,7 +74,7 @@ class CRM_Utils_Rule { /** * Validate that a string is a valid MySQL column name or alias. * - * @param $str + * @param string|null $str * * @return bool */ @@ -104,7 +104,7 @@ class CRM_Utils_Rule { * * Empty string should be treated as invalid and ignored => default = ASC. * - * @param $str + * @param string $str * @return bool */ public static function mysqlOrderByDirection($str) { @@ -118,7 +118,7 @@ class CRM_Utils_Rule { /** * Validate that a string is valid order by clause. * - * @param $str + * @param string $str * @return bool */ public static function mysqlOrderBy($str) { @@ -150,7 +150,7 @@ class CRM_Utils_Rule { } /** - * @param $str + * @param string $str * * @return bool */ @@ -171,7 +171,7 @@ class CRM_Utils_Rule { } /** - * @param $phone + * @param string|null $phone * * @return bool */ @@ -189,7 +189,7 @@ class CRM_Utils_Rule { } /** - * @param $query + * @param string|null $query * * @return bool */ @@ -208,7 +208,7 @@ class CRM_Utils_Rule { } /** - * @param $url + * @param string|null $url * * @return bool */ @@ -225,7 +225,7 @@ class CRM_Utils_Rule { } /** - * @param $url + * @param string|null $url * * @return bool */ @@ -238,7 +238,7 @@ class CRM_Utils_Rule { } /** - * @param $string + * @param string $string * * @return bool */ @@ -248,7 +248,7 @@ class CRM_Utils_Rule { } /** - * @param $domain + * @param string $domain * * @return bool */ @@ -410,7 +410,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -443,7 +443,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -462,7 +462,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -478,7 +478,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -504,7 +504,7 @@ class CRM_Utils_Rule { * @see \CRM_Utils_RuleTest::alphanumericData * for examples of vales that give TRUE/FALSE here * - * @param $value + * @param string $value * * @return bool */ @@ -513,8 +513,8 @@ class CRM_Utils_Rule { } /** - * @param $value - * @param $noOfDigit + * @param string $value + * @param int $noOfDigit * * @return bool */ @@ -525,7 +525,7 @@ class CRM_Utils_Rule { /** * Strict validation of 6-digit hex color notation per html5 * - * @param $value + * @param string $value * @return bool */ public static function color($value) { @@ -587,7 +587,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param string $value * * @return bool */ @@ -605,7 +605,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * @param int $maxLength * * @return bool @@ -620,7 +620,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param bool|string $value * * @return bool */ @@ -635,7 +635,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -697,7 +697,7 @@ class CRM_Utils_Rule { * allow between 4-6 digits as postal code since india needs 6 and US needs 5 (or * if u disregard the first 0, 4 (thanx excel!) * FIXME: we need to figure out how to localize such rules - * @param $value + * @param string $value * * @return bool */ @@ -786,8 +786,8 @@ class CRM_Utils_Rule { } /** - * @param $value - * @param $type + * @param string $value + * @param string $type * * @return bool */ @@ -796,8 +796,8 @@ class CRM_Utils_Rule { } /** - * @param $value - * @param $type + * @param string $value + * @param string $type * * @return bool */ @@ -806,7 +806,7 @@ class CRM_Utils_Rule { } /** - * @param $value + * @param mixed $value * * @return bool */ @@ -838,7 +838,7 @@ class CRM_Utils_Rule { } /** - * @param $path + * @param string $path * * @return bool */ @@ -926,7 +926,7 @@ class CRM_Utils_Rule { } /** - * @param $key + * @param mixed $key * * @return bool */ diff --git a/CRM/Utils/Sort.php b/CRM/Utils/Sort.php index a18e106118..09ffd3b6c1 100644 --- a/CRM/Utils/Sort.php +++ b/CRM/Utils/Sort.php @@ -251,8 +251,8 @@ class CRM_Utils_Sort { /** * Universal callback function for sorting by weight, id, title or name * - * @param $a - * @param $b + * @param array $a + * @param array $b * * @return int * (-1 or 1) diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index 5ee79d831c..991a376142 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -420,7 +420,7 @@ class CRM_Utils_String { * @param string $str * The string to be translated. * - * @return bool + * @return string|false */ public static function strtoboolstr($str) { if (!is_scalar($str)) { diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index f163aea7dd..a4660834c5 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -357,7 +357,7 @@ abstract class CRM_Utils_System_Base { /** * Get the relative path to the sites base url. * - * @return bool + * @return string|false */ public function getRelativeBaseURL() { $absoluteBaseURL = $this->getAbsoluteBaseURL(); diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 00c035499c..d52e4c457b 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -252,7 +252,7 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * FIXME: This is not a legacy function and the above is not a safe assumption. * External urls are allowed by CRM_Core_Resources and this needs to return the correct value. * - * @param $url + * @param string $url * * @return bool */ diff --git a/CRM/Utils/XML.php b/CRM/Utils/XML.php index 47619c1c6a..12eb7a629e 100644 --- a/CRM/Utils/XML.php +++ b/CRM/Utils/XML.php @@ -18,7 +18,7 @@ class CRM_Utils_XML { /** * Read a well-formed XML file * - * @param $file + * @param string $file * * @return array * (0 => SimpleXMLElement|FALSE, 1 => errorMessage|FALSE) -- 2.25.1