diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index 65b441c90711..fffd67e0dbfd 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -57,7 +57,7 @@ public static function create(&$params) { * @param array $defaults * (reference ) an assoc array to hold the flattened values. * - * @return array + * @return CRM_Batch_BAO_Batch|null * CRM_Batch_BAO_Batch object on success, null otherwise */ public static function retrieve(&$params, &$defaults) { @@ -364,7 +364,7 @@ public static function getBatchCount(&$params) { * @param array $params * Associated array for params. * - * @return string + * @return string[] */ public static function whereClause($params) { $clauses = []; diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 8baa7f6bd7c9..94aa6d818b59 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1814,7 +1814,7 @@ public static function formatGroupTree($groupTree, $groupCount = 1, &$form = NUL $formattedGroupTree[$key]['collapse_adv_display'] = $value['collapse_adv_display'] ?? NULL; $formattedGroupTree[$key]['style'] = $value['style'] ?? NULL; - // this params needed of bulding multiple values + // this params needed of building multiple values $formattedGroupTree[$key]['is_multiple'] = $value['is_multiple'] ?? NULL; $formattedGroupTree[$key]['extends'] = $value['extends'] ?? NULL; $formattedGroupTree[$key]['extends_entity_column_id'] = $value['extends_entity_column_id'] ?? NULL; diff --git a/CRM/Core/BAO/Website.php b/CRM/Core/BAO/Website.php index d6b420a6bf52..9a7059073190 100644 --- a/CRM/Core/BAO/Website.php +++ b/CRM/Core/BAO/Website.php @@ -119,7 +119,7 @@ public static function del($id) { * @param array $params * @param $values * - * @return bool + * @return array */ public static function &getValues(&$params = [], &$values = []) { $websites = []; diff --git a/CRM/Core/Reference/Basic.php b/CRM/Core/Reference/Basic.php index 5bd6792bc855..4e54a1b77df3 100644 --- a/CRM/Core/Reference/Basic.php +++ b/CRM/Core/Reference/Basic.php @@ -15,7 +15,7 @@ class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface { /** * @param $refTable * @param $refKey - * @param null $targetTable + * @param string $targetTable * @param string $targetKey * @param null $refTypeColumn */ diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index d25115408594..ae786cb11809 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -650,13 +650,12 @@ public static function getParticipantCount( } /** - * Get the information to map a event. + * Get the information to map an event. * * @param int $id * For which we want map info. * - * @return null|string - * title of the event + * @return array */ public static function &getMapInfo(&$id) { @@ -1261,7 +1260,7 @@ public static function sendMail($contactID, $values, $participantId, $isTest = F * @param int $id * @param string $name * @param int $cid - * @param string $template + * @param \CRM_Core_Smarty $template * @param int $participantId * @param bool $isTest * @param bool $returnResults @@ -1663,7 +1662,7 @@ public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$ } } elseif ($dao->data_type == 'Float') { - $customVal = (float ) ($params[$name]); + $customVal = (float) ($params[$name]); } elseif ($dao->data_type == 'Date') { //@todo note the currently we are using default date time formatting. Since you can select/set @@ -2233,7 +2232,7 @@ public static function getFromEmailIds($eventId = NULL) { * * @param int $eventId * Event id. - * @param sting $extraWhereClause + * @param string $extraWhereClause * Extra filter on participants. * * @return int diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 1964f754632d..913a29bb1ddf 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -798,7 +798,7 @@ public static function resolveDefaults(&$defaults, $reverse = FALSE) { * * @param array $defaults * @param string $property - * @param string $lookup + * @param string[] $lookup * @param bool $reverse * * @return bool @@ -1596,8 +1596,7 @@ public static function isPrimaryParticipant($participantId) { * @param int $newStatusId * New status. * - * @return bool - * true if allowed + * @return array */ public static function getValidAdditionalIds($participantId, $oldStatusId, $newStatusId) { diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index 7773107cc0e2..3eb2a7efa981 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -311,7 +311,7 @@ public function buildRegistrationBlock(&$form) { * Subroutine to insert a Profile Editor widget. * depends on getProfileSelectorTypes * - * @param array &$form + * @param \CRM_Core_Form &$form * @param int $count * Unique index. * @param string $prefix @@ -392,7 +392,6 @@ public function buildConfirmationBlock(&$form) { * Build Email Block. * * @param CRM_Core_Form $form - * */ public function buildMailBlock(&$form) { $form->registerRule('emailList', 'callback', 'emailList', 'CRM_Utils_Rule'); @@ -421,7 +420,6 @@ public function buildThankYouBlock(&$form) { /** * Add local and global form rules. * - * * @return void */ public function addRules() { @@ -621,7 +619,7 @@ public static function formRule($values, $files, $form) { * Collect all email fields for an array of profile ids. * * @param $profileIds - * @return bool + * @return array */ public static function getEmailFields($profileIds) { $emailFields = []; @@ -771,7 +769,6 @@ public static function addMultipleProfiles(&$profileIds, $values, $field) { /** * Process the form submission. * - * * @return void */ public function postProcess() { diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 204304aaf00e..0dba12c4ef0d 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -2181,7 +2181,7 @@ protected function getRevenueRecognitionDate() { } /** - * Store the parameters to create a payment, if approprite, on the form. + * Store the parameters to create a payment, if appropriate, on the form. * * @param array $params * Params as submitted. diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index ed29d62e1c83..8f141a2a8565 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -16,7 +16,7 @@ */ /** - * Event Info Page - Summmary about the event + * Event Info Page - Summary about the event */ class CRM_Event_Page_EventInfo extends CRM_Core_Page { diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index fdcaf58df144..3ff31c429b54 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -117,7 +117,7 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co /** * The query object. * - * @var string + * @var CRM_Contact_BAO_Query */ protected $_query; diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index df3411111446..62d1b25bf991 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -119,7 +119,7 @@ public function checkRequirements() { /** * Get a list of all available extensions. * - * @return array + * @return CRM_Extension_Info[] * ($key => CRM_Extension_Info) */ public function getExtensions() { @@ -159,7 +159,7 @@ public function getExtension($key) { } /** - * @return array + * @return CRM_Extension_Info[] * @throws CRM_Extension_Exception_ParseException */ private function _discoverRemote() { diff --git a/CRM/Extension/Info.php b/CRM/Extension/Info.php index 2f14314c078b..4382427353dd 100644 --- a/CRM/Extension/Info.php +++ b/CRM/Extension/Info.php @@ -23,12 +23,28 @@ class CRM_Extension_Info { const FILENAME = 'info.xml'; /** - * @var string + * @var string|null */ public $key = NULL; + + /** + * @var string|null + */ public $type = NULL; + + /** + * @var string|null + */ public $name = NULL; + + /** + * @var string|null + */ public $label = NULL; + + /** + * @var string|null + */ public $file = NULL; /** @@ -140,11 +156,11 @@ public static function buildReverseMap($infos) { } /** - * @param null $key - * @param null $type - * @param null $name - * @param null $label - * @param null $file + * @param string|null $key + * @param string|null $type + * @param string|null $name + * @param string|null $label + * @param string|null $file */ public function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) { $this->key = $key; diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index 7f56f176f2f6..e056a7b24d98 100644 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -546,7 +546,7 @@ public function refresh() { * @todo We should improve this to return more appropriate text. eg. when an extension is not installed * it should not say "version xx is installed". * - * @param array $remoteExtensionInfo + * @param CRM_Extension_Info $remoteExtensionInfo * @param array $localExtensionInfo * * @return string diff --git a/CRM/Financial/BAO/ExportFormat.php b/CRM/Financial/BAO/ExportFormat.php index 09c389c3d672..9559a5d4c60d 100644 --- a/CRM/Financial/BAO/ExportFormat.php +++ b/CRM/Financial/BAO/ExportFormat.php @@ -214,7 +214,7 @@ public static function createActivityExport($batchIds, $fileName) { /** * @param array $files - * @param null $destination + * @param string $destination * @param bool $overwrite * * @return bool @@ -224,7 +224,7 @@ public function createZip($files = [], $destination = NULL, $overwrite = FALSE) if (file_exists($destination) && !$overwrite) { return FALSE; } - $valid_files = []; + if (is_array($files)) { foreach ($files as $file) { // make sure the file exists diff --git a/CRM/Financial/Form/Export.php b/CRM/Financial/Form/Export.php index d820b2696512..07ba0153bb6a 100644 --- a/CRM/Financial/Form/Export.php +++ b/CRM/Financial/Form/Export.php @@ -31,9 +31,11 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { /** * Financial batch ids. - * @var array + * (comma-separated array) + * + * @var string */ - protected $_batchIds = []; + protected $_batchIds = ''; /** * Export status id. diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index 9d09e62d20fd..d9a633c77d7d 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -512,7 +512,7 @@ private function _getCreateQuery($table) { * Get column query. * * @param string $col - * @param bool $createQuery + * @param array $createQuery * * @return array|mixed|string */ diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index d7b2817d656d..7c68125455d7 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -995,7 +995,7 @@ public function getVerpAndUrlsAndHeaders($job_id, $event_queue_id, $hash, $email * @param bool $isForward * Is this mailing compose for forward?. * @param string $fromEmail - * Email address of who is forwardinf it. + * Email address of who is forwarding it. * * @param null $replyToEmail * @@ -2289,7 +2289,7 @@ public static function mailingACLIDs() { * @param int $offset * The row number to start from. * @param int $rowCount - * The nmber of rows to return. + * The number of rows to return. * @param string $sort * The sql string that describes the sort order. * diff --git a/CRM/Mailing/Event/BAO/Forward.php b/CRM/Mailing/Event/BAO/Forward.php index b3621241b6cf..b8900a6b9ad8 100644 --- a/CRM/Mailing/Event/BAO/Forward.php +++ b/CRM/Mailing/Event/BAO/Forward.php @@ -30,8 +30,8 @@ public function __construct() { * @param $queue_id * @param $hash * @param $forward_email - * @param null $fromEmail - * @param null $comment + * @param string|null $fromEmail + * @param array|null $comment * * @return bool */ diff --git a/CRM/Mailing/Page/Browse.php b/CRM/Mailing/Page/Browse.php index a02b6adcbb70..74f1d3ff4f39 100644 --- a/CRM/Mailing/Page/Browse.php +++ b/CRM/Mailing/Page/Browse.php @@ -17,7 +17,7 @@ /** * This implements the profile page for all contacts. It uses a selector - * object to do the actual dispay. The fields displayd are controlled by + * object to do the actual display. The fields displayed are controlled by * the admin */ class CRM_Mailing_Page_Browse extends CRM_Core_Page { diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index ff06bbf8664d..ee049881eca6 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -638,7 +638,7 @@ protected function submit() { /** * Send a receipt. * - * @param array $membership + * @param CRM_Member_BAO_Membership $membership * * @throws \CRM_Core_Exception */ diff --git a/CRM/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index c57491f7b96f..e47d96f71e23 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -103,7 +103,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C /** * The query object. * - * @var string + * @var CRM_Contact_BAO_Query */ protected $_query; diff --git a/CRM/Pledge/Selector/Search.php b/CRM/Pledge/Selector/Search.php index c82b10c184b6..e803a9be0938 100644 --- a/CRM/Pledge/Selector/Search.php +++ b/CRM/Pledge/Selector/Search.php @@ -107,7 +107,7 @@ class CRM_Pledge_Selector_Search extends CRM_Core_Selector_Base { /** * The query object * - * @var string + * @var CRM_Contact_BAO_Query */ protected $_query; @@ -428,7 +428,7 @@ public function &getColumnHeaders($action = NULL, $output = NULL) { /** * Get sql query string. * - * @return string + * @return CRM_Contact_BAO_Query */ public function &getQuery() { return $this->_query; diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index c5c512035112..ab096b848d4a 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -492,7 +492,7 @@ public static function syncLineItems($entityId, $entityTable, $amount, $otherPar * @param array $params * Form values. * - * @param string $entityId + * @param string[]|null $entityId * Entity id. * * @param string $entityTable diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 987eea19e1d3..322a8d9b1124 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -297,10 +297,12 @@ class CRM_Report_Form extends CRM_Core_Form { * @var int */ protected $_offsetValue = NULL; + /** - * @var null + * @var array */ - protected $_sections = NULL; + protected $_sections = []; + protected $_autoIncludeIndexedFieldsAsOrderBys = 0; /** @@ -3917,7 +3919,7 @@ public function whereMembershipTypeClause($value, $op) { } /** - * Buld contact acl clause + * Build contact acl clause * @deprecated in favor of buildPermissionClause * * Note that if the buildPermissionClause function is called (which most reports do from @@ -3930,7 +3932,7 @@ public function buildACLClause($tableAlias = 'contact_a') { } /** - * Build the permision clause for all entities in this report + * Build the permission clause for all entities in this report */ public function buildPermissionClause() { $ret = []; diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php index c53db4eda8b9..9eb9702f016a 100644 --- a/CRM/Utils/Type.php +++ b/CRM/Utils/Type.php @@ -334,11 +334,10 @@ public static function escape($data, $type, $abort = TRUE) { default: throw new CRM_Core_Exception( - $type . " is not a recognised (camel cased) data type." + $type . " is not a recognized (camel cased) data type." ); } - // @todo Use exceptions instead of CRM_Core_Error::fatal(). if ($abort) { $data = htmlentities($data); @@ -607,7 +606,7 @@ public static function mysqlOrderByCallback($matches) { } /** - * Get list of avaliable Data Types for Option Groups + * Get list of available Data Types for Option Groups * * @return array */