Skip to content

Commit

Permalink
Another set of PHPDoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
braders committed Jan 16, 2022
1 parent 44861be commit dac7ff5
Show file tree
Hide file tree
Showing 71 changed files with 238 additions and 234 deletions.
2 changes: 1 addition & 1 deletion CRM/ACL/BAO/ACLEntityRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function entityTables(): array {
/**
* @param array $params
*
* @return CRM_ACL_DAO_EntityRole
* @return CRM_ACL_BAO_ACLEntityRole
*/
public static function create(&$params) {
return self::writeRecord($params);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Activity/Controller/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Admin/Form/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function buildQuickForm($check = FALSE) {
}

/**
* @param $fields
* @param array $fields
*
* @return array|bool
* @throws API_Exception
Expand Down
4 changes: 2 additions & 2 deletions CRM/Admin/Form/PaymentProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function buildQuickForm($check = FALSE) {
}

/**
* @param $fields
* @param array $fields
*
* @return array|bool
*/
Expand Down Expand Up @@ -297,7 +297,7 @@ public static function formRule($fields) {
/**
* @param array $fields
* @param array $errors
* @param null $section
* @param string|null $section
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Admin/Form/Preferences/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function buildQuickForm() {
}

/**
* @param $fields
* @param array $fields
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Admin/Form/Setting/Localization.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function buildQuickForm() {
}

/**
* @param $fields
* @param array $fields
*
* @return array|bool
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Admin/Form/Setting/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function buildQuickForm() {
}

/**
* @param $fields
* @param array $fields
*
* @return array|bool
*/
Expand Down
4 changes: 2 additions & 2 deletions CRM/Admin/Page/MessageTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
25 changes: 13 additions & 12 deletions CRM/Badge/BAO/Badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static function formatLabel(&$row, &$layout) {
}

/**
* @param $formattedRow
* @param array $formattedRow
*/
public function generateLabel($formattedRow) {
switch ($formattedRow['labelFormat']) {
Expand All @@ -164,7 +164,7 @@ public function generateLabel($formattedRow) {
}

/**
* @param $formattedRow
* @param array $formattedRow
* @param int $cellspacing
*/
public function labelCreator(&$formattedRow, $cellspacing = 0) {
Expand Down Expand Up @@ -349,13 +349,12 @@ public function labelCreator(&$formattedRow, $cellspacing = 0) {
*
* @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();
}
Expand All @@ -375,12 +374,14 @@ public function printImage($img, $x = '', $y = '', $w = NULL, $h = NULL) {
}

/**
* @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);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Campaign/Controller/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
6 changes: 3 additions & 3 deletions CRM/Case/BAO/Case.php
Original file line number Diff line number Diff line change
Expand Up @@ -1515,16 +1515,16 @@ public static function restoreCase($caseId) {
}

/**
* @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();
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/PseudoConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function __construct(
* - Edit
*
* @param bool $isDeleted
* @param null $key
* @param string|null $key
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/XMLProcessor/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public function getCustomData($clientID, $activityDAO, &$activityTypeInfo) {

/**
* @param int $activityTypeID
* @param null $dateFormat
* @param string|null $dateFormat
* @param bool $onlyActive
*
* @return mixed
Expand Down
18 changes: 9 additions & 9 deletions CRM/Contact/BAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ public static function getHierContactDetails($contactId, $fields) {
*
* This is for the query to use, create the right sql.
*
* @param $fields
* @param array $fields
* @param int $contactId
* Contact id.
*
Expand Down Expand Up @@ -1844,7 +1844,7 @@ public static function &makeHierReturnProperties($fields, $contactId = NULL) {
*
* @param int $contactId
* @param bool $skipDefaultPrimary
* @param null $block
* @param string|null $block
*
* @return int|NULL
* $locationType location_type_id
Expand Down Expand Up @@ -2106,10 +2106,10 @@ public static function createProfileContact(
* 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
Expand Down Expand Up @@ -2696,7 +2696,7 @@ public static function getValues(&$params, &$values) {
* @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) {
Expand Down Expand Up @@ -3367,8 +3367,8 @@ public static function getTimestamps($contactId) {
/**
* 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
*
Expand Down
3 changes: 1 addition & 2 deletions CRM/Contact/BAO/Contact/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public static function getEmailDetails($id, $isPrimary = TRUE, $locationTypeID =
*
* @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)
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/Contact/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public static function validateOnlyChecksum($contactID, &$form, $redirect = TRUE

/**
* @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();
Expand Down
9 changes: 4 additions & 5 deletions CRM/Contact/BAO/Contact/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ public static function checkContactType(&$contactIds) {
* 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 )
Expand Down Expand Up @@ -245,9 +244,9 @@ public static function validChecksum($contactID, $inputCheck) {
*
* @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
Expand All @@ -258,7 +257,7 @@ public static function createCurrentEmployerRelationship($contactID, $employerID
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)) {
Expand Down
4 changes: 2 additions & 2 deletions CRM/Contact/BAO/ContactType.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ public static function contactTypeInfo($all = FALSE) {
* 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
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/GroupContactCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static function deterministicCacheFlush() {
* 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.
Expand Down
4 changes: 2 additions & 2 deletions CRM/Contact/BAO/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ public static function isRelatedMembershipExpired($membershipTypeRelationshipTyp
/**
* Get Current Employer for Contact.
*
* @param $contactIds
* @param array $contactIds
* Contact Ids.
*
* @return array
Expand Down Expand Up @@ -2186,7 +2186,7 @@ private static function isRelationshipTypeCurrentEmployer(int $existingTypeID):
/**
* Is the inherited relationship invalidated by this relationship change.
*
* @param $membershipValues
* @param array $membershipValues
* @param array $values
* @param int $cid
*
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/SearchCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function contactIDSQL($csID, $ssID) {
}

/**
* @param $args
* @param string $args
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ public static function blockDataExists(&$fields) {
*
* @param array $fields
* Fields array which are submitted.
* @param $errors
* @param array $errors
* @param int $contactID
* Contact id.
* @param string $contactType
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ protected function setMessage($outcome) {
}

/**
* @param $relationshipList
* @param array $relationshipList
*
* @return array
*/
Expand Down
4 changes: 2 additions & 2 deletions CRM/Contact/Form/Task/LabelCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public static function createLabel($contactRows, $format, $fileName = 'MailingLa
/**
* 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.
*
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Import/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions CRM/Contact/Import/ImportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit dac7ff5

Please sign in to comment.