From 77855840b2562acc9f18b2cb4f9c22f8036bc967 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 11:41:10 -0800 Subject: [PATCH] INFRA-132 - CRM/Utils - Convert single-line @param to multi-line --- CRM/Utils/API/HTMLInputCoder.php | 3 +- CRM/Utils/API/MatchOption.php | 6 +- CRM/Utils/Address.php | 15 +- CRM/Utils/Array.php | 3 +- CRM/Utils/Cache.php | 3 +- CRM/Utils/Cache/APCcache.php | 3 +- CRM/Utils/Cache/ArrayCache.php | 3 +- CRM/Utils/Cache/Memcache.php | 3 +- CRM/Utils/Cache/Memcached.php | 3 +- CRM/Utils/Cache/NoCache.php | 3 +- CRM/Utils/Cache/SerializeCache.php | 3 +- CRM/Utils/Cache/SqlGroup.php | 3 +- CRM/Utils/Check/Security.php | 15 +- CRM/Utils/Date.php | 90 ++++-- CRM/Utils/DeprecatedUtils.php | 39 ++- CRM/Utils/File.php | 42 ++- CRM/Utils/Geocode/Yahoo.php | 6 +- CRM/Utils/GlobalStack.php | 3 +- CRM/Utils/Hook.php | 426 +++++++++++++++++++---------- CRM/Utils/Hook/DrupalBase.php | 21 +- CRM/Utils/Hook/Joomla.php | 24 +- CRM/Utils/Hook/Soap.php | 24 +- CRM/Utils/Hook/UnitTests.php | 30 +- CRM/Utils/Hook/WordPress.php | 24 +- CRM/Utils/HttpClient.php | 12 +- CRM/Utils/ICalendar.php | 18 +- CRM/Utils/JS.php | 3 +- CRM/Utils/JSON.php | 30 +- CRM/Utils/Mail.php | 6 +- CRM/Utils/Mail/EmailProcessor.php | 6 +- CRM/Utils/Migrate/Export.php | 21 +- CRM/Utils/Migrate/Import.php | 3 +- CRM/Utils/Money.php | 12 +- CRM/Utils/Network.php | 6 +- CRM/Utils/Number.php | 6 +- CRM/Utils/OpenFlashChart.php | 9 +- CRM/Utils/OptionBag.php | 15 +- CRM/Utils/PDF/Label.php | 3 +- CRM/Utils/Pager.php | 9 +- CRM/Utils/PagerAToZ.php | 12 +- CRM/Utils/PseudoConstant.php | 3 +- CRM/Utils/QueryFormatter.php | 12 +- CRM/Utils/REST.php | 3 +- CRM/Utils/Recent.php | 15 +- CRM/Utils/Rule.php | 15 +- CRM/Utils/SQL/Insert.php | 6 +- CRM/Utils/SQL/Select.php | 12 +- CRM/Utils/Signer.php | 18 +- CRM/Utils/SoapServer.php | 12 +- CRM/Utils/Sort.php | 18 +- CRM/Utils/String.php | 106 ++++--- CRM/Utils/System.php | 5 +- CRM/Utils/System/Base.php | 21 +- CRM/Utils/System/Drupal.php | 80 ++++-- CRM/Utils/System/Drupal6.php | 89 ++++-- CRM/Utils/System/Drupal8.php | 86 ++++-- CRM/Utils/System/DrupalBase.php | 42 ++- CRM/Utils/System/Joomla.php | 87 ++++-- CRM/Utils/System/Soap.php | 33 ++- CRM/Utils/System/UnitTests.php | 42 ++- CRM/Utils/System/WordPress.php | 69 +++-- CRM/Utils/Time.php | 18 +- CRM/Utils/Token.php | 222 ++++++++++----- CRM/Utils/Tree.php | 15 +- CRM/Utils/Type.php | 4 +- CRM/Utils/Verp.php | 9 +- CRM/Utils/Weight.php | 73 +++-- CRM/Utils/Wrapper.php | 10 +- CRM/Utils/XML.php | 3 +- CRM/Utils/Zip.php | 9 +- 70 files changed, 1388 insertions(+), 715 deletions(-) diff --git a/CRM/Utils/API/HTMLInputCoder.php b/CRM/Utils/API/HTMLInputCoder.php index 7aa265b9c3..744f231150 100644 --- a/CRM/Utils/API/HTMLInputCoder.php +++ b/CRM/Utils/API/HTMLInputCoder.php @@ -118,7 +118,8 @@ class CRM_Utils_API_HTMLInputCoder extends CRM_Utils_API_AbstractFieldCoder { * submitted values across XSS vulnerability. * * @param array|string $values - * @param bool $castToString If TRUE, all scalars will be filtered (and therefore cast to strings) + * @param bool $castToString + * If TRUE, all scalars will be filtered (and therefore cast to strings). * If FALSE, then non-string values will be preserved */ public function encodeInput(&$values, $castToString = FALSE) { diff --git a/CRM/Utils/API/MatchOption.php b/CRM/Utils/API/MatchOption.php index 0542478c67..2f48bd8ff4 100644 --- a/CRM/Utils/API/MatchOption.php +++ b/CRM/Utils/API/MatchOption.php @@ -169,8 +169,10 @@ class CRM_Utils_API_MatchOption implements API_Wrapper { /** * Create APIv3 "get" parameters to lookup an existing record using $keys * - * @param array $origParams api request - * @param array $keys list of keys to match against + * @param array $origParams + * Api request. + * @param array $keys + * List of keys to match against. * * @return array APIv3 $params */ diff --git a/CRM/Utils/Address.php b/CRM/Utils/Address.php index 6d166d62f2..af5e691cbb 100644 --- a/CRM/Utils/Address.php +++ b/CRM/Utils/Address.php @@ -38,11 +38,16 @@ class CRM_Utils_Address { * Format an address basing on the address fields provided. * Use Setting's address_format if there's no format specified. * - * @param array $fields the address fields - * @param string $format the desired address format - * @param boolean $microformat if true indicates, the address to be built in hcard-microformat standard. - * @param boolean $mailing if true indicates, the call has been made from mailing label - * @param boolean $individualFormat if true indicates, the call has been made for the contact of type 'individual' + * @param array $fields + * The address fields. + * @param string $format + * The desired address format. + * @param bool $microformat + * If true indicates, the address to be built in hcard-microformat standard. + * @param bool $mailing + * If true indicates, the call has been made from mailing label. + * @param bool $individualFormat + * If true indicates, the call has been made for the contact of type 'individual'. * * @param null $tokenFields * diff --git a/CRM/Utils/Array.php b/CRM/Utils/Array.php index 1f6791bd6f..ccd61ba889 100644 --- a/CRM/Utils/Array.php +++ b/CRM/Utils/Array.php @@ -806,7 +806,8 @@ class CRM_Utils_Array { * not appear in the result. * * @param array $array - * @param array $keys list of keys to copy + * @param array $keys + * List of keys to copy. * @return array */ public static function subset($array, $keys) { diff --git a/CRM/Utils/Cache.php b/CRM/Utils/Cache.php index 1a338ec445..5c909e56b2 100644 --- a/CRM/Utils/Cache.php +++ b/CRM/Utils/Cache.php @@ -50,7 +50,8 @@ class CRM_Utils_Cache { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache */ diff --git a/CRM/Utils/Cache/APCcache.php b/CRM/Utils/Cache/APCcache.php index 5bbbbe1440..28b4e28445 100644 --- a/CRM/Utils/Cache/APCcache.php +++ b/CRM/Utils/Cache/APCcache.php @@ -57,7 +57,8 @@ class CRM_Utils_Cache_APCcache { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_APCcache */ diff --git a/CRM/Utils/Cache/ArrayCache.php b/CRM/Utils/Cache/ArrayCache.php index 61188ab1b3..65c8f7a2e5 100644 --- a/CRM/Utils/Cache/ArrayCache.php +++ b/CRM/Utils/Cache/ArrayCache.php @@ -13,7 +13,8 @@ class CRM_Utils_Cache_Arraycache implements CRM_Utils_Cache_Interface { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_Arraycache */ diff --git a/CRM/Utils/Cache/Memcache.php b/CRM/Utils/Cache/Memcache.php index 63d5cb12dc..7d601c1098 100644 --- a/CRM/Utils/Cache/Memcache.php +++ b/CRM/Utils/Cache/Memcache.php @@ -80,7 +80,8 @@ class CRM_Utils_Cache_Memcache { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_Memcache */ diff --git a/CRM/Utils/Cache/Memcached.php b/CRM/Utils/Cache/Memcached.php index e5ce5d792a..7c36fd3aeb 100644 --- a/CRM/Utils/Cache/Memcached.php +++ b/CRM/Utils/Cache/Memcached.php @@ -81,7 +81,8 @@ class CRM_Utils_Cache_Memcached { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_Memcached */ diff --git a/CRM/Utils/Cache/NoCache.php b/CRM/Utils/Cache/NoCache.php index afbb9307a1..e3a0aa8dd0 100644 --- a/CRM/Utils/Cache/NoCache.php +++ b/CRM/Utils/Cache/NoCache.php @@ -47,7 +47,8 @@ class CRM_Utils_Cache_NoCache implements CRM_Utils_Cache_Interface { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_NoCache */ diff --git a/CRM/Utils/Cache/SerializeCache.php b/CRM/Utils/Cache/SerializeCache.php index 3d2c42d8b8..b60738297f 100644 --- a/CRM/Utils/Cache/SerializeCache.php +++ b/CRM/Utils/Cache/SerializeCache.php @@ -38,7 +38,8 @@ class CRM_Utils_Cache_SerializeCache implements CRM_Utils_Cache_Interface { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * * @return \CRM_Utils_Cache_SerializeCache */ diff --git a/CRM/Utils/Cache/SqlGroup.php b/CRM/Utils/Cache/SqlGroup.php index 7234010a5a..eefa9cd867 100644 --- a/CRM/Utils/Cache/SqlGroup.php +++ b/CRM/Utils/Cache/SqlGroup.php @@ -60,7 +60,8 @@ class CRM_Utils_Cache_SqlGroup implements CRM_Utils_Cache_Interface { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config + * An array of configuration params. * - group: string * - componentID: int * - prefetch: bool, whether to preemptively read the entire cache group; default: TRUE diff --git a/CRM/Utils/Check/Security.php b/CRM/Utils/Check/Security.php index e130ab6834..a2ef3d8baf 100644 --- a/CRM/Utils/Check/Security.php +++ b/CRM/Utils/Check/Security.php @@ -210,8 +210,10 @@ class CRM_Utils_Check_Security { /** * Determine whether $url is a public, browsable listing for $dir * - * @param string $dir local dir path - * @param string $url public URL + * @param string $dir + * Local dir path. + * @param string $url + * Public URL. * @return bool */ public function isBrowsable($dir, $url) { @@ -237,8 +239,10 @@ class CRM_Utils_Check_Security { * Determine whether $url is a public version of $dir in which files * are remotely accessible. * - * @param string $dir local dir path - * @param string $url public URL + * @param string $dir + * Local dir path. + * @param string $url + * Public URL. * @return bool */ public function isDirAccessible($dir, $url) { @@ -279,7 +283,8 @@ class CRM_Utils_Check_Security { /** * Make a guess about the URL that corresponds to $targetDir. * - * @param string $targetDir local path to a directory + * @param string $targetDir + * Local path to a directory. * @return string a guessed URL for $realDir */ public function guessUrl($targetDir) { diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index 0699808a7d..6352552c93 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -41,8 +41,10 @@ class CRM_Utils_Date { /** * Format a date by padding it with leading '0'. * - * @param array $date ('Y', 'M', 'd') - * @param string $separator the seperator to use when formatting the date + * @param array $date + * ('Y', 'M', 'd'). + * @param string $separator + * The seperator to use when formatting the date. * @param int|string $invalidDate what to return if the date is invalid * * @return string - formatted string for date @@ -288,9 +290,12 @@ class CRM_Utils_Date { * %P - uppercase ante/post meridiem ('AM', 'PM') * %Y - year as a decimal number including the century ('2005') * - * @param string $dateString date and time in 'YYYY-MM-DD hh:mm:ss' format - * @param string $format the output format - * @param array $dateParts an array with the desired date parts + * @param string $dateString + * Date and time in 'YYYY-MM-DD hh:mm:ss' format. + * @param string $format + * The output format. + * @param array $dateParts + * An array with the desired date parts. * * @return string the $format-formatted $date * @static @@ -423,7 +428,8 @@ class CRM_Utils_Date { /** * Converts the date/datetime from MySQL format to ISO format * - * @param string $mysql date/datetime in MySQL format + * @param string $mysql + * Date/datetime in MySQL format. * * @return string date/datetime in ISO format * @static @@ -465,7 +471,8 @@ class CRM_Utils_Date { * used to update an object with a date field was used. The DAO now checks for a '-' in date field strings * & runs this function if the - appears - meaning it is likely redundant in the form & BAO layers * - * @param string $iso date/datetime in ISO format + * @param string $iso + * Date/datetime in ISO format. * * @return string date/datetime in MySQL format * @static @@ -478,9 +485,12 @@ class CRM_Utils_Date { /** * Converts the any given date to default date format. * - * @param array $params has given date-format - * @param int $dateType type of date - * @param string $dateParam index of params + * @param array $params + * Has given date-format. + * @param int $dateType + * Type of date. + * @param string $dateParam + * Index of params. * * @return bool * @static @@ -711,9 +721,11 @@ class CRM_Utils_Date { 'day' => '25', 'month' => '10', * 'year' => '2007' ); * - * @param Array $dayParams Array of the day, month, year + * @param Array $dayParams + * Array of the day, month, year. * values. - * @param string $format expected date format( default + * @param string $format + * Expected date format( default. * format is 2007-12-21 ) * * @return string Return the customized todays date (Y-m-d) @@ -738,8 +750,10 @@ class CRM_Utils_Date { * Find whether today's date lies in * the given range * - * @param date $startDate start date for the range - * @param date $endDate end date for the range + * @param date $startDate + * Start date for the range. + * @param date $endDate + * End date for the range. * * @return true todays date is in the given date range * @static @@ -766,7 +780,8 @@ class CRM_Utils_Date { * Get start date and end from * the given relative term and unit * - * @param date $relative eg: term.unit + * @param date $relative + * Eg: term.unit. * * @param $from * @param $to @@ -792,7 +807,8 @@ class CRM_Utils_Date { /** * Calculate Age in Years if greater than one year else in months * - * @param date $birthDate Birth Date + * @param date $birthDate + * Birth Date. * * @return int array $results contains years or months * @static @@ -847,11 +863,14 @@ class CRM_Utils_Date { /** * Calculate next payment date according to provided unit & interval * - * @param string $unit frequency unit like year,month, week etc.. + * @param string $unit + * Frequency unit like year,month, week etc. * - * @param int $interval frequency interval. + * @param int $interval + * Frequency interval. * - * @param array $date start date of pledge. + * @param array $date + * Start date of pledge. * * @param bool $dontCareTime * @@ -911,7 +930,8 @@ class CRM_Utils_Date { * Check given format is valid for bith date. * and retrun supportable birth date format w/ qf mapping. * - * @param $format given format ( eg 'M Y', 'Y M' ) + * @param $format + * Given format ( eg 'M Y', 'Y M' ). * return array of qfMapping and date parts for date format. * * @return array|null|string @@ -941,8 +961,10 @@ class CRM_Utils_Date { /** * Resolves the given relative time interval into finite time limits * - * @param array $relativeTerm relative time frame like this, previous, etc - * @param int $unit frequency unit like year, month, week etc.. + * @param array $relativeTerm + * Relative time frame like this, previous, etc. + * @param int $unit + * Frequency unit like year, month, week etc. * * @return array $dateRange start date and end date for the relative time frame * @static @@ -1610,9 +1632,11 @@ class CRM_Utils_Date { /** * Calculate current fiscal year based on the fiscal month and day * - * @param int $fyDate Fiscal start date + * @param int $fyDate + * Fiscal start date. * - * @param int $fyMonth Fiscal Start Month + * @param int $fyMonth + * Fiscal Start Month. * * @return int $fy Current Fiscl Year * @static @@ -1639,11 +1663,14 @@ class CRM_Utils_Date { /** * Function to process date, convert to mysql format * - * @param string $date date string - * @param string $time time string + * @param string $date + * Date string. + * @param string $time + * Time string. * @param bool|string $returnNullString 'null' needs to be returned * so that db oject will set null in db - * @param string $format expected return date format.( default is mysql ) + * @param string $format + * Expected return date format.( default is mysql ). * * @return string $mysqlDate date format that is excepted by mysql */ @@ -1664,7 +1691,8 @@ class CRM_Utils_Date { /** * Function to convert mysql to date plugin format * - * @param string $mysqlDate date string + * @param string $mysqlDate + * Date string. * * @param null $formatType * @param null $format @@ -1735,7 +1763,8 @@ class CRM_Utils_Date { /** * Function get date format * - * @param string $formatType Date name e.g. birth + * @param string $formatType + * Date name e.g. birth. * * @return string $format */ @@ -1757,7 +1786,8 @@ class CRM_Utils_Date { /** * Get the time in UTC for the current time. You can optionally send an offset from the current time if needed * - * @param $offset int the offset from the current time in seconds + * @param $offset + * Int the offset from the current time in seconds. * * @return the time in UTC * @static diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php index 600de55d2f..bf6255ac2c 100644 --- a/CRM/Utils/DeprecatedUtils.php +++ b/CRM/Utils/DeprecatedUtils.php @@ -38,9 +38,11 @@ require_once 'api/v3/utils.php'; * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. - * @param array $values The reformatted properties that we can use internally + * @param array $values + * The reformatted properties that we can use internally. * * @param array|bool $create Is the formatted Values array going to * be used for CRM_vent_BAO_Participant:create() @@ -208,9 +210,11 @@ function _civicrm_api3_deprecated_participant_formatted_param($params, &$values, * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. - * @param array $values The reformatted properties that we can use internally + * @param array $values + * The reformatted properties that we can use internally. * ' * * @param bool $create @@ -668,9 +672,11 @@ function _civicrm_api3_deprecated_check_contact_dedupe($params) { * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. - * @param array $values The reformatted properties that we can use internally + * @param array $values + * The reformatted properties that we can use internally. * * @param array|bool $create Is the formatted Values array going to * be used for CRM_Activity_BAO_Activity::create() @@ -748,8 +754,10 @@ function _civicrm_api3_deprecated_activity_formatted_param(&$params, &$values, $ * the variable being added is a child of Location, a location_type_id must * also be included. If it is a child of phone, a phone_type must be included. * - * @param array $values The variable(s) to be added - * @param array $params The structured parameter list + * @param array $values + * The variable(s) to be added. + * @param array $params + * The structured parameter list. * * @return bool|CRM_Utils_Error */ @@ -962,8 +970,10 @@ function _civicrm_api3_deprecated_add_formatted_param(&$values, &$params) { /** * This function format location blocks w/ v3.0 format. * - * @param array $values The variable(s) to be added - * @param array $params The structured parameter list + * @param array $values + * The variable(s) to be added. + * @param array $params + * The structured parameter list. * * @return bool */ @@ -1152,7 +1162,8 @@ function _civicrm_api3_deprecated_duplicate_formatted_contact($params) { /** * Validate a formatted contact parameter list. * - * @param array $params Structured parameter list (as in crm_format_params) + * @param array $params + * Structured parameter list (as in crm_format_params). * * @return bool|CRM_Core_Error */ @@ -1284,9 +1295,11 @@ function _civicrm_api3_deprecated_participant_check_params($params, $checkDuplic /** * Ensure that we have the right input parameters for custom data * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. - * @param string $csType contact subtype if exists/passed. + * @param string $csType + * Contact subtype if exists/passed. * * @return null on success, error message otherwise */ diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index f435ad175e..f74afbe09a 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -41,7 +41,8 @@ class CRM_Utils_File { /** * Given a file name, determine if the file contents make it an ascii file * - * @param string $name name of file + * @param string $name + * Name of file. * * @return boolean true if file is ascii */ @@ -67,7 +68,8 @@ class CRM_Utils_File { /** * Given a file name, determine if the file contents make it an html file * - * @param string $name name of file + * @param string $name + * Name of file. * * @return boolean true if file is html */ @@ -96,8 +98,10 @@ class CRM_Utils_File { * Create a directory given a path name, creates parent directories * if needed * - * @param string $path the path name - * @param boolean $abort should we abort or just return an invalid code + * @param string $path + * The path name. + * @param bool $abort + * Should we abort or just return an invalid code. * * @return void * @static @@ -126,7 +130,8 @@ class CRM_Utils_File { * Delete a directory given a path name, delete children directories * and files if needed * - * @param string $target the path name + * @param string $target + * The path name. * @param bool $rmdir * @param bool $verbose * @@ -195,7 +200,8 @@ class CRM_Utils_File { /** * Given a file name, recode it (in place!) to UTF-8 * - * @param string $name name of file + * @param string $name + * Name of file. * * @return boolean whether the file was recoded properly */ @@ -338,7 +344,8 @@ class CRM_Utils_File { /** * Determine whether a given file is listed in the PHP include path * - * @param string $name name of file + * @param string $name + * Name of file. * * @return boolean whether the file can be include()d or require()d */ @@ -408,7 +415,8 @@ class CRM_Utils_File { /** * Restrict access to a given directory (by planting there a restrictive .htaccess file) * - * @param string $dir the directory to be secured + * @param string $dir + * The directory to be secured. * @param bool $overwrite */ public static function restrictAccess($dir, $overwrite = FALSE) { @@ -560,7 +568,8 @@ HTACCESS; * * TODO: Automatic file cleanup using, eg, TTL policy * - * @param $prefix string + * @param $prefix + * String. * * @return string, path to an openable/writable file * @see tempnam @@ -578,7 +587,8 @@ HTACCESS; * * TODO: Automatic file cleanup using, eg, TTL policy * - * @param $prefix string + * @param $prefix + * String. * * @return string, path to an openable/writable directory; ends with '/' * @see tempnam @@ -595,8 +605,10 @@ HTACCESS; * * Note: Dot-directories (like "..", ".git", or ".svn") will be ignored. * - * @param $dir string, base dir - * @param $pattern string, glob pattern, eg "*.txt" + * @param $dir + * String, base dir. + * @param $pattern + * String, glob pattern, eg "*.txt". * @return array(string) */ public static function findFiles($dir, $pattern) { @@ -660,8 +672,10 @@ HTACCESS; * Move $fromDir to $toDir, replacing/deleting any * pre-existing content. * - * @param string $fromDir the directory which should be moved - * @param string $toDir the new location of the directory + * @param string $fromDir + * The directory which should be moved. + * @param string $toDir + * The new location of the directory. * @param bool $verbose * * @return bool TRUE on success diff --git a/CRM/Utils/Geocode/Yahoo.php b/CRM/Utils/Geocode/Yahoo.php index 7dd1e82692..10d01f4c5c 100644 --- a/CRM/Utils/Geocode/Yahoo.php +++ b/CRM/Utils/Geocode/Yahoo.php @@ -60,8 +60,10 @@ class CRM_Utils_Geocode_Yahoo { * and postal code for this address. Note that at a later stage, we could * make this function also clean up the address into a more valid format * - * @param array $values associative array of address data: country, street_address, city, state_province, postal code - * @param boolean $stateName this parameter currently has no function + * @param array $values + * Associative array of address data: country, street_address, city, state_province, postal code. + * @param bool $stateName + * This parameter currently has no function. * * @return boolean true if we modified the address, false otherwise * @static diff --git a/CRM/Utils/GlobalStack.php b/CRM/Utils/GlobalStack.php index 9452405b70..102fd034de 100644 --- a/CRM/Utils/GlobalStack.php +++ b/CRM/Utils/GlobalStack.php @@ -77,7 +77,8 @@ class CRM_Utils_GlobalStack { } /** - * @param array $new the new, incoming frame + * @param array $new + * The new, incoming frame. * @return array frame */ public function createBackup($new) { diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 7e97befac0..edb706fa8d 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -92,14 +92,22 @@ abstract class CRM_Utils_Hook { /** *Invoke hooks * - * @param int $numParams Number of parameters to pass to the hook - * @param mixed $arg1 parameter to be passed to the hook - * @param mixed $arg2 parameter to be passed to the hook - * @param mixed $arg3 parameter to be passed to the hook - * @param mixed $arg4 parameter to be passed to the hook - * @param mixed $arg5 parameter to be passed to the hook - * @param mixed $arg6 parameter to be passed to the hook - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param int $numParams + * Number of parameters to pass to the hook. + * @param mixed $arg1 + * Parameter to be passed to the hook. + * @param mixed $arg2 + * Parameter to be passed to the hook. + * @param mixed $arg3 + * Parameter to be passed to the hook. + * @param mixed $arg4 + * Parameter to be passed to the hook. + * @param mixed $arg5 + * Parameter to be passed to the hook. + * @param mixed $arg6 + * Parameter to be passed to the hook. + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return mixed */ @@ -252,10 +260,14 @@ abstract class CRM_Utils_Hook { * This hook is called before a db write on some core objects. * This hook does not allow the abort of the operation * - * @param string $op the type of operation being performed - * @param string $objectName the name of the object - * @param int $id the object id if available - * @param array $params the parameters used for object creation / editing + * @param string $op + * The type of operation being performed. + * @param string $objectName + * The name of the object. + * @param int $id + * The object id if available. + * @param array $params + * The parameters used for object creation / editing. * * @return null the return value is ignored */ @@ -269,10 +281,14 @@ abstract class CRM_Utils_Hook { /** * This hook is called after a db write on some core objects. * - * @param string $op the type of operation being performed - * @param string $objectName the name of the object - * @param int $objectId the unique identifier for the object - * @param object $objectRef the reference to the object if available + * @param string $op + * The type of operation being performed. + * @param string $objectName + * The name of the object. + * @param int $objectId + * The unique identifier for the object. + * @param object $objectRef + * The reference to the object if available. * * @return mixed based on op. pre-hooks return a boolean or * an error message which aborts the operation @@ -288,12 +304,18 @@ abstract class CRM_Utils_Hook { * This hook retrieves links from other modules and injects it into * the view contact tabs * - * @param string $op the type of operation being performed - * @param string $objectName the name of the object - * @param int $objectId the unique identifier for the object - * @param array $links (optional) the links array (introduced in v3.2) - * @param int $mask (optional) the bitmask to show/hide links - * @param array $values (optional) the values to fill the links + * @param string $op + * The type of operation being performed. + * @param string $objectName + * The name of the object. + * @param int $objectId + * The unique identifier for the object. + * @param array $links + * (optional) the links array (introduced in v3.2). + * @param int $mask + * (optional) the bitmask to show/hide links. + * @param array $values + * (optional) the values to fill the links. * * @return null the return value is ignored */ @@ -304,8 +326,10 @@ abstract class CRM_Utils_Hook { /** * This hook is invoked during the CiviCRM form preProcess phase. * - * @param string $formName the name of the form - * @param CRM_Core_Form $form reference to the form object + * @param string $formName + * The name of the form. + * @param CRM_Core_Form $form + * Reference to the form object. * * @return null the return value is ignored */ @@ -317,8 +341,10 @@ abstract class CRM_Utils_Hook { * This hook is invoked when building a CiviCRM form. This hook should also * be used to set the default values of a form element * - * @param string $formName the name of the form - * @param CRM_Core_Form $form reference to the form object + * @param string $formName + * The name of the form. + * @param CRM_Core_Form $form + * Reference to the form object. * * @return null the return value is ignored */ @@ -330,8 +356,10 @@ abstract class CRM_Utils_Hook { * This hook is invoked when a CiviCRM form is submitted. If the module has injected * any form elements, this hook should save the values in the database * - * @param string $formName the name of the form - * @param CRM_Core_Form $form reference to the form object + * @param string $formName + * The name of the form. + * @param CRM_Core_Form $form + * Reference to the form object. * * @return null the return value is ignored */ @@ -343,10 +371,11 @@ abstract class CRM_Utils_Hook { * This hook is invoked during all CiviCRM form validation. An array of errors * detected is returned. Else we assume validation succeeded. * - * @param string $formName the name of the form - * @param array &$fields the POST parameters as filtered by QF - * @param array &$files the FILES parameters as sent in by POST - * @param array &$form the form object + * @param string $formName + * The name of the form. + * @param array &$fields the POST parameters as filtered by QF + * @param array &$files the FILES parameters as sent in by POST + * @param array &$form the form object * * @return mixed formRule hooks return a boolean or * an array of error messages which display a QF Error @@ -359,11 +388,12 @@ abstract class CRM_Utils_Hook { * This hook is invoked during all CiviCRM form validation. An array of errors * detected is returned. Else we assume validation succeeded. * - * @param string $formName the name of the form - * @param array &$fields the POST parameters as filtered by QF - * @param array &$files the FILES parameters as sent in by POST - * @param array &$form the form object - * @param array &$errors the array of errors. + * @param string $formName + * The name of the form. + * @param array &$fields the POST parameters as filtered by QF + * @param array &$files the FILES parameters as sent in by POST + * @param array &$form the form object + * @param array &$errors the array of errors. * * @return mixed formRule hooks return a boolean or * an array of error messages which display a QF Error @@ -375,10 +405,14 @@ abstract class CRM_Utils_Hook { /** * This hook is called before a db write on a custom table * - * @param string $op the type of operation being performed - * @param string $groupID the custom group ID - * @param object $entityID the entityID of the row in the custom table - * @param array $params the parameters that were sent into the calling function + * @param string $op + * The type of operation being performed. + * @param string $groupID + * The custom group ID. + * @param object $entityID + * The entityID of the row in the custom table. + * @param array $params + * The parameters that were sent into the calling function. * * @return null the return value is ignored */ @@ -390,11 +424,16 @@ abstract class CRM_Utils_Hook { * This hook is called when composing the ACL where clause to restrict * visibility of contacts to the logged in user * - * @param int $type the type of permission needed - * @param array $tables (reference ) add the tables that are needed for the select clause - * @param array $whereTables (reference ) add the tables that are needed for the where clause - * @param int $contactID the contactID for whom the check is made - * @param string $where the currrent where clause + * @param int $type + * The type of permission needed. + * @param array $tables + * (reference ) add the tables that are needed for the select clause. + * @param array $whereTables + * (reference ) add the tables that are needed for the where clause. + * @param int $contactID + * The contactID for whom the check is made. + * @param string $where + * The currrent where clause. * * @return null the return value is ignored */ @@ -406,11 +445,16 @@ abstract class CRM_Utils_Hook { * This hook is called when composing the ACL where clause to restrict * visibility of contacts to the logged in user * - * @param int $type the type of permission needed - * @param int $contactID the contactID for whom the check is made - * @param string $tableName the tableName which is being permissioned - * @param array $allGroups the set of all the objects for the above table - * @param array $currentGroups the set of objects that are currently permissioned for this contact + * @param int $type + * The type of permission needed. + * @param int $contactID + * The contactID for whom the check is made. + * @param string $tableName + * The tableName which is being permissioned. + * @param array $allGroups + * The set of all the objects for the above table. + * @param array $currentGroups + * The set of objects that are currently permissioned for this contact. * * @return null the return value is ignored */ @@ -421,7 +465,8 @@ abstract class CRM_Utils_Hook { /** * This hook is called when building the menu table * - * @param array $files The current set of files to process + * @param array $files + * The current set of files to process. * * @return null the return value is ignored */ @@ -435,7 +480,8 @@ abstract class CRM_Utils_Hook { /** * This hook is called for declaring managed entities via API * - * @param array $entities List of pending entities + * @param array $entities + * List of pending entities. * * @return null the return value is ignored */ @@ -449,8 +495,10 @@ abstract class CRM_Utils_Hook { /** * This hook is called when rendering the dashboard (q=civicrm/dashboard) * - * @param int $contactID - the contactID for whom the dashboard is being rendered - * @param int $contentPlacement - (output parameter) where should the hook content be displayed + * @param int $contactID + * The contactID for whom the dashboard is being rendered. + * @param int $contentPlacement + * (output parameter) where should the hook content be displayed. * relative to the activity list * * @return string the html snippet to include in the dashboard @@ -476,7 +524,8 @@ abstract class CRM_Utils_Hook { /** * This hook is called before storing recently viewed items. * - * @param array $recentArray - an array of recently viewed or processed items, for in place modification + * @param array $recentArray + * An array of recently viewed or processed items, for in place modification. * * @return array */ @@ -490,8 +539,10 @@ abstract class CRM_Utils_Hook { /** * Determine how many other records refer to a given record * - * @param CRM_Core_DAO $dao the item for which we want a reference count - * @param array $refCounts each item in the array is an array with keys: + * @param CRM_Core_DAO $dao + * The item for which we want a reference count. + * @param array $refCounts + * Each item in the array is an array with keys:. * - name: string, eg "sql:civicrm_email:contact_id" * - type: string, eg "sql" * - count: int, eg "5" if there are 5 email addresses that refer to $dao @@ -507,9 +558,12 @@ abstract class CRM_Utils_Hook { /** * This hook is called when building the amount structure for a Contribution or Event Page * - * @param int $pageType - is this a contribution or event page - * @param CRM_Core_Form $form - reference to the form object - * @param array $amount - the amount structure to be displayed + * @param int $pageType + * Is this a contribution or event page. + * @param CRM_Core_Form $form + * Reference to the form object. + * @param array $amount + * The amount structure to be displayed. * * @return null */ @@ -537,8 +591,10 @@ abstract class CRM_Utils_Hook { /** * This hook is called when rendering the tabs for a contact (q=civicrm/contact/view)c * - * @param array $tabs - the array of tabs that will be displayed - * @param int $contactID - the contactID for whom the dashboard is being rendered + * @param array $tabs + * The array of tabs that will be displayed. + * @param int $contactID + * The contactID for whom the dashboard is being rendered. * * @return null */ @@ -570,7 +626,8 @@ abstract class CRM_Utils_Hook { /** * This hook is called when sending an email / printing labels * - * @param array $tokens - the list of tokens that can be used for the contact + * @param array $tokens + * The list of tokens that can be used for the contact. * * @return null */ @@ -584,11 +641,16 @@ abstract class CRM_Utils_Hook { * This hook is called when sending an email / printing labels to get the values for all the * tokens returned by the 'tokens' hook * - * @param array $details - the array to store the token values indexed by contactIDs (unless it a single) - * @param array $contactIDs - an array of contactIDs - * @param int $jobID - the jobID if this is associated with a CiviMail mailing - * @param array $tokens - the list of tokens associated with the content - * @param string $className - the top level className from where the hook is invoked + * @param array $details + * The array to store the token values indexed by contactIDs (unless it a single). + * @param array $contactIDs + * An array of contactIDs. + * @param int $jobID + * The jobID if this is associated with a CiviMail mailing. + * @param array $tokens + * The list of tokens associated with the content. + * @param string $className + * The top level className from where the hook is invoked. * * @return null */ @@ -605,7 +667,8 @@ abstract class CRM_Utils_Hook { * This hook is called before a CiviCRM Page is rendered. You can use this hook to insert smarty variables * in a template * - * @param object $page - the page that will be rendered + * @param object $page + * The page that will be rendered. * * @return null */ @@ -620,8 +683,10 @@ abstract class CRM_Utils_Hook { * This hook is called after a copy of an object has been made. The current objects are * Event, Contribution Page and UFGroup * - * @param string $objectName - name of the object - * @param object $object - reference to the copy + * @param string $objectName + * Name of the object. + * @param object $object + * Reference to the copy. * * @return null */ @@ -658,15 +723,19 @@ abstract class CRM_Utils_Hook { * This hook is called when CiviCRM needs to edit/display a custom field with options (select, radio, checkbox, * adv multiselect) * - * @param int $customFieldID - the custom field ID - * @param array $options - the current set of options for that custom field. + * @param int $customFieldID + * The custom field ID. + * @param array $options + * The current set of options for that custom field. * You can add/remove existing options. * Important: This array may contain meta-data about the field that is needed elsewhere, so it is important * to be careful to not overwrite the array. * Only add/edit/remove the specific field options you intend to affect. - * @param boolean $detailedFormat - if true, + * @param bool $detailedFormat + * If true,. * the options are in an ID => array ( 'id' => ID, 'label' => label, 'value' => value ) format - * @param array $selectAttributes contain select attribute(s) if any + * @param array $selectAttributes + * Contain select attribute(s) if any. * * @return mixed */ @@ -682,9 +751,11 @@ abstract class CRM_Utils_Hook { * This hook is called to display the list of actions allowed after doing a search. * This allows the module developer to inject additional actions or to remove existing actions. * - * @param string $objectType - the object type for this search + * @param string $objectType + * The object type for this search. * - activity, campaign, case, contact, contribution, event, grant, membership, and pledge are supported. - * @param array $tasks - the current set of tasks for that custom field. + * @param array $tasks + * The current set of tasks for that custom field. * You can add/remove existing tasks. * Each task needs to have a title (eg 'title' => ts( 'Add Contacts to Group')) and a class * (eg 'class' => 'CRM_Contact_Form_Task_AddToGroup'). @@ -781,15 +852,19 @@ abstract class CRM_Utils_Hook { * - you can override that behavior by providing a SQL query that returns some subset of your contacts. * The hook is called when the query is executed to get the list of contacts to display. * - * @param mixed $query - - the query that will be executed (input and output parameter); + * @param mixed $query + * - the query that will be executed (input and output parameter);. * It's important to realize that the ACL clause is built prior to this hook being fired, * so your query will ignore any ACL rules that may be defined. * Your query must return two columns: * the contact 'data' to display in the autocomplete dropdown (usually contact.sort_name - aliased as 'data') * the contact IDs - * @param string $name - the name string to execute the query against (this is the value being typed in by the user) - * @param string $context - the context in which this ajax call is being made (for example: 'customfield', 'caseview') - * @param int $id - the id of the object for which the call is being made. + * @param string $name + * The name string to execute the query against (this is the value being typed in by the user). + * @param string $context + * The context in which this ajax call is being made (for example: 'customfield', 'caseview'). + * @param int $id + * The id of the object for which the call is being made. * For custom fields, it will be the custom field id * * @return mixed @@ -834,7 +909,8 @@ abstract class CRM_Utils_Hook { * @param array $params * Array fields include: groupName, from, toName, toEmail, subject, cc, bcc, text, html, * returnPath, replyTo, headers, attachments (array) - * @param string $context - the context in which the hook is being invoked, eg 'civimail' + * @param string $context + * The context in which the hook is being invoked, eg 'civimail'. * * @return mixed */ @@ -848,15 +924,18 @@ abstract class CRM_Utils_Hook { /** * This hook is called when membership status is being calculated * - * @param array $membershipStatus membership status details as determined - alter if required - * @param array $arguments arguments passed in to calculate date + * @param array $membershipStatus + * Membership status details as determined - alter if required. + * @param array $arguments + * Arguments passed in to calculate date. * - 'start_date' * - 'end_date' * - 'status_date' * - 'join_date' * - 'exclude_is_admin' * - 'membership_type_id' - * @param array $membership membership details from the calling function + * @param array $membership + * Membership details from the calling function. * * @return mixed */ @@ -870,7 +949,8 @@ abstract class CRM_Utils_Hook { /** * This hook is called when rendering the Manage Case screen * - * @param int $caseID - the case ID + * @param int $caseID + * The case ID. * * @return array of data to be displayed, where the key is a unique id to be used for styling (div id's) * and the value is an array with keys 'label' and 'value' specifying label/value pairs @@ -958,11 +1038,16 @@ abstract class CRM_Utils_Hook { /** * This hook allows modification of the data used to perform merging of duplicates. * - * @param string $type the type of data being passed (cidRefs|eidRefs|relTables|sqls) - * @param array $data the data, as described in $type - * @param int $mainId contact_id of the contact that survives the merge - * @param int $otherId contact_id of the contact that will be absorbed and deleted - * @param array $tables when $type is "sqls", an array of tables as it may have been handed to the calling function + * @param string $type + * The type of data being passed (cidRefs|eidRefs|relTables|sqls). + * @param array $data + * The data, as described in $type. + * @param int $mainId + * Contact_id of the contact that survives the merge. + * @param int $otherId + * Contact_id of the contact that will be absorbed and deleted. + * @param array $tables + * When $type is "sqls", an array of tables as it may have been handed to the calling function. * * @return mixed */ @@ -988,10 +1073,14 @@ abstract class CRM_Utils_Hook { /** * This hook is called before record is exported as CSV * - * @param string $exportTempTable - name of the temporary export table used during export - * @param array $headerRows - header rows for output - * @param array $sqlColumns - SQL columns - * @param int $exportMode - export mode ( contact, contribution, etc...) + * @param string $exportTempTable + * Name of the temporary export table used during export. + * @param array $headerRows + * Header rows for output. + * @param array $sqlColumns + * SQL columns. + * @param int $exportMode + * Export mode ( contact, contribution, etc...). * * @return mixed */ @@ -1005,9 +1094,12 @@ abstract class CRM_Utils_Hook { /** * This hook allows modification of the queries constructed from dupe rules. * - * @param string $obj object of rulegroup class - * @param string $type type of queries e.g table / threshold - * @param array $query set of queries + * @param string $obj + * Object of rulegroup class. + * @param string $type + * Type of queries e.g table / threshold. + * @param array $query + * Set of queries. * * @return mixed */ @@ -1021,11 +1113,14 @@ abstract class CRM_Utils_Hook { /** * This hook is called AFTER EACH email has been processed by the script bin/EmailProcessor.php * - * @param string $type type of mail processed: 'activity' OR 'mailing' + * @param string $type + * Type of mail processed: 'activity' OR 'mailing'. * @param array &$params the params that were sent to the CiviCRM API function - * @param object $mail the mail object which is an ezcMail class + * @param object $mail + * The mail object which is an ezcMail class. * @param array &$result the result returned by the api call - * @param string $action (optional ) the requested action to be performed if the types was 'mailing' + * @param string $action + * (optional ) the requested action to be performed if the types was 'mailing'. * * @return mixed */ @@ -1037,11 +1132,15 @@ abstract class CRM_Utils_Hook { * This hook is called after a row has been processed and the * record (and associated records imported * - * @param string $object - object being imported (for now Contact only, later Contribution, Activity, + * @param string $object + * Object being imported (for now Contact only, later Contribution, Activity,. * Participant and Member) - * @param string $usage - hook usage/location (for now process only, later mapping and others) - * @param string $objectRef - import record object - * @param array $params - array with various key values: currently + * @param string $usage + * Hook usage/location (for now process only, later mapping and others). + * @param string $objectRef + * Import record object. + * @param array $params + * Array with various key values: currently. * contactID - contact id * importID - row id in temp table * importTempTable - name of tempTable @@ -1061,8 +1160,10 @@ abstract class CRM_Utils_Hook { * This hook is called when API permissions are checked (cf. civicrm_api3_api_check_permission() * in api/v3/utils.php and _civicrm_api3_permissions() in CRM/Core/DAO/permissions.php). * - * @param string $entity the API entity (like contact) - * @param string $action the API action (like get) + * @param string $entity + * The API entity (like contact). + * @param string $action + * The API action (like get). * @param array &$params the API parameters * @param array &$permissions the associative permissions array (probably to be altered by this hook) * @@ -1091,8 +1192,10 @@ abstract class CRM_Utils_Hook { /** * This hook allows user to customize context menu Actions on contact summary page. * - * @param array $actions Array of all Actions in contextmenu. - * @param int $contactID ContactID for the summary page + * @param array $actions + * Array of all Actions in contextmenu. + * @param int $contactID + * ContactID for the summary page. * * @return mixed */ @@ -1113,7 +1216,8 @@ abstract class CRM_Utils_Hook { * However, if you use the same number of columns, you can overwrite the existing columns with the values that * you want displayed. This is a hackish, but avoids template modification. * - * @param string $objectName the component name that we are doing the search + * @param string $objectName + * The component name that we are doing the search. * activity, campaign, case, contact, contribution, event, grant, membership, and pledge * @param array &$headers the list of column headers, an associative array with keys: ( name, sort, order ) * @param array &$rows the list of values, an associate array with fields that are displayed for that component @@ -1133,8 +1237,10 @@ abstract class CRM_Utils_Hook { /** * This hook is called when uf groups are being built for a module. * - * @param string $moduleName module name. - * @param array $ufGroups array of ufgroups for a module. + * @param string $moduleName + * Module name. + * @param array $ufGroups + * Array of ufgroups for a module. * * @return null */ @@ -1149,9 +1255,12 @@ abstract class CRM_Utils_Hook { * This hook is called when we are determining the contactID for a specific * email address * - * @param string $email the email address - * @param int $contactID the contactID that matches this email address, IF it exists - * @param array $result (reference) has two fields + * @param string $email + * The email address. + * @param int $contactID + * The contactID that matches this email address, IF it exists. + * @param array $result + * (reference) has two fields. * contactID - the new (or same) contactID * action - 3 possible values: * CRM_Utils_Mail_Incoming::EMAILPROCESSOR_CREATE_INDIVIDUAL - create a new contact record @@ -1170,7 +1279,8 @@ abstract class CRM_Utils_Hook { /** * Hook definition for altering the generation of Mailing Labels * - * @param array $args an array of the args in the order defined for the tcpdf multiCell api call + * @param array $args + * An array of the args in the order defined for the tcpdf multiCell api call. * with the variable names below converted into string keys (ie $w become 'w' * as the first key for $args) * float $w Width of cells. If 0, they extend up to the right margin of the page. @@ -1210,10 +1320,14 @@ abstract class CRM_Utils_Hook { /** * This hooks allows alteration of generated page content * - * @param $content previously generated content - * @param $context context of content - page or form - * @param $tplName the file name of the tpl - * @param $object a reference to the page or form object + * @param $content + * Previously generated content. + * @param $context + * Context of content - page or form. + * @param $tplName + * The file name of the tpl. + * @param $object + * A reference to the page or form object. * * @return mixed */ @@ -1228,10 +1342,14 @@ abstract class CRM_Utils_Hook { * This hooks allows alteration of the tpl file used to generate content. It differs from the * altercontent hook as the content has already been rendered through the tpl at that point * - * @param $formName previously generated content - * @param $form reference to the form object - * @param $context context of content - page or form - * @param $tplName reference the file name of the tpl + * @param $formName + * Previously generated content. + * @param $form + * Reference to the form object. + * @param $context + * Context of content - page or form. + * @param $tplName + * Reference the file name of the tpl. * * @return mixed */ @@ -1246,7 +1364,8 @@ abstract class CRM_Utils_Hook { * This hook collects the trigger definition from all components * * @param $info - * @param string $tableName (optional) the name of the table that we are interested in only + * @param string $tableName + * (optional) the name of the table that we are interested in only. * * @internal param \reference $triggerInfo to an array of trigger information * each element has 4 fields: @@ -1393,7 +1512,8 @@ abstract class CRM_Utils_Hook { * This hook is called when Settings have been loaded from the xml * It is an opportunity for hooks to alter the data * - * @param array $settingsMetaData - Settings Metadata + * @param array $settingsMetaData + * Settings Metadata. * @param int $domainID * @param mixed $profile * @@ -1459,7 +1579,8 @@ abstract class CRM_Utils_Hook { /** * @param CRM_Core_Exception Exception $exception - * @param mixed $request reserved for future use + * @param mixed $request + * Reserved for future use. */ static function unhandledException($exception, $request = NULL) { self::singleton()->invoke(2, $exception, $request, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,'civicrm_unhandled_exception'); @@ -1549,10 +1670,14 @@ abstract class CRM_Utils_Hook { /** * This hook is invoked when building a CiviCRM name badge. * - * @param string $labelName string referencing name of badge format - * @param object $label reference to the label object - * @param array $format array of format data - * @param array $participant array of participant values + * @param string $labelName + * String referencing name of badge format. + * @param object $label + * Reference to the label object. + * @param array $format + * Array of format data. + * @param array $participant + * Array of participant values. * * @return null the return value is ignored */ @@ -1564,9 +1689,12 @@ abstract class CRM_Utils_Hook { /** * This hook is called before encoding data in barcode * - * @param array $data associated array of values available for encoding - * @param string $type type of barcode, classic barcode or QRcode - * @param string $context where this hooks is invoked. + * @param array $data + * Associated array of values available for encoding. + * @param string $type + * Type of barcode, classic barcode or QRcode. + * @param string $context + * Where this hooks is invoked. * * @return mixed */ @@ -1623,10 +1751,10 @@ abstract class CRM_Utils_Hook { /** * This hook is called before a case merge (or a case reassign) * - * @param integer $mainContactId - * @param integer $mainCaseId - * @param integer $otherContactId - * @param integer $otherCaseId + * @param int $mainContactId + * @param int $mainCaseId + * @param int $otherContactId + * @param int $otherCaseId * @param bool $changeClient * * @return void @@ -1638,10 +1766,10 @@ abstract class CRM_Utils_Hook { /** * This hook is called after a case merge (or a case reassign) * - * @param integer $mainContactId - * @param integer $mainCaseId - * @param integer $otherContactId - * @param integer $otherCaseId + * @param int $mainContactId + * @param int $mainCaseId + * @param int $otherContactId + * @param int $otherCaseId * @param bool $changeClient * * @return void @@ -1658,7 +1786,8 @@ abstract class CRM_Utils_Hook { * * @param string $displayName * @param int $contactId - * @param object $dao the contact object + * @param object $dao + * The contact object. * * @return mixed */ @@ -1672,7 +1801,8 @@ abstract class CRM_Utils_Hook { /** * EXPERIMENTAL: This hook allows one to register additional Angular modules * - * @param array $angularModules list of modules + * @param array $angularModules + * List of modules. * @return null the return value is ignored * * @code @@ -1707,12 +1837,14 @@ abstract class CRM_Utils_Hook { /** * Generate a default CRUD URL for an entity * - * @param array $spec with keys: + * @param array $spec + * With keys:. * - action: int, eg CRM_Core_Action::VIEW or CRM_Core_Action::UPDATE * - entity_table: string * - entity_id: int * @param CRM_Core_DAO $bao - * @param array $link to define the link, add these keys to $link: + * @param array $link + * To define the link, add these keys to $link:. * - title: string * - path: string * - query: array diff --git a/CRM/Utils/Hook/DrupalBase.php b/CRM/Utils/Hook/DrupalBase.php index f99601c62d..6019cf8a2f 100644 --- a/CRM/Utils/Hook/DrupalBase.php +++ b/CRM/Utils/Hook/DrupalBase.php @@ -57,14 +57,21 @@ class CRM_Utils_Hook_DrupalBase extends CRM_Utils_Hook { /** * @see CRM_Utils_Hook::invoke() * - * @param integer $numParams Number of parameters to pass to the hook - * @param unknown $arg1 parameter to be passed to the hook - * @param unknown $arg2 parameter to be passed to the hook - * @param unknown $arg3 parameter to be passed to the hook - * @param unknown $arg4 parameter to be passed to the hook - * @param unknown $arg5 parameter to be passed to the hook + * @param int $numParams + * Number of parameters to pass to the hook. + * @param unknown $arg1 + * Parameter to be passed to the hook. + * @param unknown $arg2 + * Parameter to be passed to the hook. + * @param unknown $arg3 + * Parameter to be passed to the hook. + * @param unknown $arg4 + * Parameter to be passed to the hook. + * @param unknown $arg5 + * Parameter to be passed to the hook. * @param mixed $arg6 - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return array|bool */ diff --git a/CRM/Utils/Hook/Joomla.php b/CRM/Utils/Hook/Joomla.php index b5c7fbaa9f..68ba2936d0 100644 --- a/CRM/Utils/Hook/Joomla.php +++ b/CRM/Utils/Hook/Joomla.php @@ -37,14 +37,22 @@ class CRM_Utils_Hook_Joomla extends CRM_Utils_Hook { /** *Invoke hooks * - * @param int $numParams Number of parameters to pass to the hook - * @param mixed $arg1 parameter to be passed to the hook - * @param mixed $arg2 parameter to be passed to the hook - * @param mixed $arg3 parameter to be passed to the hook - * @param mixed $arg4 parameter to be passed to the hook - * @param mixed $arg5 parameter to be passed to the hook - * @param mixed $arg6 parameter to be passed to the hook - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param int $numParams + * Number of parameters to pass to the hook. + * @param mixed $arg1 + * Parameter to be passed to the hook. + * @param mixed $arg2 + * Parameter to be passed to the hook. + * @param mixed $arg3 + * Parameter to be passed to the hook. + * @param mixed $arg4 + * Parameter to be passed to the hook. + * @param mixed $arg5 + * Parameter to be passed to the hook. + * @param mixed $arg6 + * Parameter to be passed to the hook. + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return mixed */ diff --git a/CRM/Utils/Hook/Soap.php b/CRM/Utils/Hook/Soap.php index 8f26da58c3..eae8e5e0e7 100644 --- a/CRM/Utils/Hook/Soap.php +++ b/CRM/Utils/Hook/Soap.php @@ -37,14 +37,22 @@ class CRM_Utils_Hook_Soap extends CRM_Utils_Hook { /** *Invoke hooks * - * @param int $numParams Number of parameters to pass to the hook - * @param mixed $arg1 parameter to be passed to the hook - * @param mixed $arg2 parameter to be passed to the hook - * @param mixed $arg3 parameter to be passed to the hook - * @param mixed $arg4 parameter to be passed to the hook - * @param mixed $arg5 parameter to be passed to the hook - * @param mixed $arg6 parameter to be passed to the hook - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param int $numParams + * Number of parameters to pass to the hook. + * @param mixed $arg1 + * Parameter to be passed to the hook. + * @param mixed $arg2 + * Parameter to be passed to the hook. + * @param mixed $arg3 + * Parameter to be passed to the hook. + * @param mixed $arg4 + * Parameter to be passed to the hook. + * @param mixed $arg5 + * Parameter to be passed to the hook. + * @param mixed $arg6 + * Parameter to be passed to the hook. + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return mixed */ diff --git a/CRM/Utils/Hook/UnitTests.php b/CRM/Utils/Hook/UnitTests.php index 661d884dea..a4cf2f61fb 100644 --- a/CRM/Utils/Hook/UnitTests.php +++ b/CRM/Utils/Hook/UnitTests.php @@ -62,8 +62,10 @@ class CRM_Utils_Hook_UnitTests extends CRM_Utils_Hook { /** * Register a piece of code to run when invoking a hook - * @param string $hook hook name, e.g civicrm_pre - * @param array $callable function to call ie array(class, method) + * @param string $hook + * Hook name, e.g civicrm_pre. + * @param array $callable + * Function to call ie array(class, method). * eg. array($this, mymethod) */ public function setHook($hook, $callable) { @@ -73,14 +75,22 @@ class CRM_Utils_Hook_UnitTests extends CRM_Utils_Hook { /** *Invoke hooks * - * @param int $numParams Number of parameters to pass to the hook - * @param mixed $arg1 parameter to be passed to the hook - * @param mixed $arg2 parameter to be passed to the hook - * @param mixed $arg3 parameter to be passed to the hook - * @param mixed $arg4 parameter to be passed to the hook - * @param mixed $arg5 parameter to be passed to the hook - * @param mixed $arg6 parameter to be passed to the hook - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param int $numParams + * Number of parameters to pass to the hook. + * @param mixed $arg1 + * Parameter to be passed to the hook. + * @param mixed $arg2 + * Parameter to be passed to the hook. + * @param mixed $arg3 + * Parameter to be passed to the hook. + * @param mixed $arg4 + * Parameter to be passed to the hook. + * @param mixed $arg5 + * Parameter to be passed to the hook. + * @param mixed $arg6 + * Parameter to be passed to the hook. + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return mixed */ diff --git a/CRM/Utils/Hook/WordPress.php b/CRM/Utils/Hook/WordPress.php index 2959fa5f65..34dca47e55 100644 --- a/CRM/Utils/Hook/WordPress.php +++ b/CRM/Utils/Hook/WordPress.php @@ -66,14 +66,22 @@ class CRM_Utils_Hook_WordPress extends CRM_Utils_Hook { /** *Invoke hooks * - * @param int $numParams Number of parameters to pass to the hook - * @param mixed $arg1 parameter to be passed to the hook - * @param mixed $arg2 parameter to be passed to the hook - * @param mixed $arg3 parameter to be passed to the hook - * @param mixed $arg4 parameter to be passed to the hook - * @param mixed $arg5 parameter to be passed to the hook - * @param mixed $arg6 parameter to be passed to the hook - * @param string $fnSuffix function suffix, this is effectively the hook name + * @param int $numParams + * Number of parameters to pass to the hook. + * @param mixed $arg1 + * Parameter to be passed to the hook. + * @param mixed $arg2 + * Parameter to be passed to the hook. + * @param mixed $arg3 + * Parameter to be passed to the hook. + * @param mixed $arg4 + * Parameter to be passed to the hook. + * @param mixed $arg5 + * Parameter to be passed to the hook. + * @param mixed $arg6 + * Parameter to be passed to the hook. + * @param string $fnSuffix + * Function suffix, this is effectively the hook name. * * @return mixed */ diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index 8d8ae349af..9d82079e3f 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -74,8 +74,10 @@ class CRM_Utils_HttpClient { /** * Download the remote zipfile. * - * @param string $remoteFile URL of a .zip file - * @param string $localFile path at which to store the .zip file + * @param string $remoteFile + * URL of a .zip file. + * @param string $localFile + * Path at which to store the .zip file. * @return STATUS_OK|STATUS_WRITE_ERROR|STATUS_DL_ERROR */ public function fetch($remoteFile, $localFile) { @@ -114,7 +116,8 @@ class CRM_Utils_HttpClient { /** * Send an HTTP GET for a remote resource * - * @param string $remoteFile URL of remote file + * @param string $remoteFile + * URL of remote file. * @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string) */ public function get($remoteFile) { @@ -150,7 +153,8 @@ class CRM_Utils_HttpClient { /** * Send an HTTP POST for a remote resource * - * @param string $remoteFile URL of a .zip file + * @param string $remoteFile + * URL of a .zip file. * @param array $params * * @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string) diff --git a/CRM/Utils/ICalendar.php b/CRM/Utils/ICalendar.php index 120bfbb138..f9d63c270f 100644 --- a/CRM/Utils/ICalendar.php +++ b/CRM/Utils/ICalendar.php @@ -45,7 +45,8 @@ class CRM_Utils_ICalendar { /** * Escape text elements for safe ICalendar use * - * @param $text Text to escape + * @param $text + * Text to escape. * * @return Escaped text * @@ -64,7 +65,8 @@ class CRM_Utils_ICalendar { /** * Escape date elements for safe ICalendar use * - * @param $date Date to escape + * @param $date + * Date to escape. * * @param bool $gdata * @@ -91,11 +93,15 @@ class CRM_Utils_ICalendar { * - 'text/xml' : used for gData or rss formatted feeds * * - * @param string $calendar The calendar data to be published. + * @param string $calendar + * The calendar data to be published. * @param string $content_type - * @param string $charset The character set to use, defaults to 'us-ascii'. - * @param string $fileName The file name (for downloads) - * @param string $disposition How the file should be sent ('attachment' for downloads) + * @param string $charset + * The character set to use, defaults to 'us-ascii'. + * @param string $fileName + * The file name (for downloads). + * @param string $disposition + * How the file should be sent ('attachment' for downloads). * * @return void */ diff --git a/CRM/Utils/JS.php b/CRM/Utils/JS.php index f631a2b09a..389e8bc486 100644 --- a/CRM/Utils/JS.php +++ b/CRM/Utils/JS.php @@ -38,7 +38,8 @@ class CRM_Utils_JS { /** * Parse a javascript file for translatable strings * - * @param string $jsCode raw Javascript code + * @param string $jsCode + * Raw Javascript code. * @return array of translatable strings */ public static function parseStrings($jsCode) { diff --git a/CRM/Utils/JSON.php b/CRM/Utils/JSON.php index d25c77f588..b9631e3889 100644 --- a/CRM/Utils/JSON.php +++ b/CRM/Utils/JSON.php @@ -52,9 +52,11 @@ class CRM_Utils_JSON { * Create JSON object * @deprecated * - * @param array $params associated array, that needs to be + * @param array $params + * Associated array, that needs to be. * converted to JSON array - * @param string $identifier identifier for the JSON array + * @param string $identifier + * Identifier for the JSON array. * * @return string $jsonObject JSON array * @static @@ -74,10 +76,13 @@ class CRM_Utils_JSON { /** * Encode json format for flexigrid, NOTE: "id" should be present in $params for each row * - * @param array $params associated array of values rows - * @param int $page page no for selector + * @param array $params + * Associated array of values rows. + * @param int $page + * Page no for selector. * @param $total - * @param array $selectorElements selector rows + * @param array $selectorElements + * Selector rows. * * @return json encode string */ @@ -117,11 +122,16 @@ class CRM_Utils_JSON { /** * This function is used to encode data for dataTable plugin * - * @param array $params associated array of row elements - * @param int $sEcho datatable needs this to make it more secure - * @param int $iTotal total records - * @param int $iFilteredTotal total records on a page - * @param array $selectorElements selector elements + * @param array $params + * Associated array of row elements. + * @param int $sEcho + * Datatable needs this to make it more secure. + * @param int $iTotal + * Total records. + * @param int $iFilteredTotal + * Total records on a page. + * @param array $selectorElements + * Selector elements. * @return string * */ diff --git a/CRM/Utils/Mail.php b/CRM/Utils/Mail.php index 873e926da8..da0e512a25 100644 --- a/CRM/Utils/Mail.php +++ b/CRM/Utils/Mail.php @@ -52,7 +52,8 @@ class CRM_Utils_Mail { * mime_type: mime type of the attachment * cleanName: the user friendly name of the attachmment * - * @param array $params (by reference) + * @param array $params + * (by reference). * * * @return boolean true if a mail was sent, else false @@ -253,7 +254,8 @@ class CRM_Utils_Mail { * * Ugly but working. * - * @param string $header the full name + email address string + * @param string $header + * The full name + email address string. * * @return string the plucked email address * @static diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index cef40d0052..47be237421 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -66,8 +66,10 @@ class CRM_Utils_Mail_EmailProcessor { /** * Delete old files from a given directory (recursively) * - * @param string $dir directory to cleanup - * @param int $age files older than this many seconds will be deleted (default: 60 days) + * @param string $dir + * Directory to cleanup. + * @param int $age + * Files older than this many seconds will be deleted (default: 60 days). * * @return void */ diff --git a/CRM/Utils/Migrate/Export.php b/CRM/Utils/Migrate/Export.php index 66ee4ba6f0..62a09696b5 100644 --- a/CRM/Utils/Migrate/Export.php +++ b/CRM/Utils/Migrate/Export.php @@ -267,7 +267,8 @@ class CRM_Utils_Migrate_Export { } /** - * @param array $customGroupIds list of custom groups to export + * @param array $customGroupIds + * List of custom groups to export. * @return void */ public function buildCustomGroups($customGroupIds) { @@ -320,7 +321,8 @@ class CRM_Utils_Migrate_Export { } /** - * @param array $ufGroupIds list of custom groups to export + * @param array $ufGroupIds + * List of custom groups to export. * @return void */ public function buildUFGroups($ufGroupIds) { @@ -429,8 +431,10 @@ class CRM_Utils_Migrate_Export { /** * Compute any fields of the entity defined by the $mappedFields specification * - * @param array $mappedFields each item is an array(0 => MappedEntityname, 1 => InputFieldName (id-field), 2 => OutputFieldName (name-field), 3 => OptionalPrefix) - * @param CRM_Core_DAO $dao the entity for which we want to prepare mapped fields + * @param array $mappedFields + * Each item is an array(0 => MappedEntityname, 1 => InputFieldName (id-field), 2 => OutputFieldName (name-field), 3 => OptionalPrefix). + * @param CRM_Core_DAO $dao + * The entity for which we want to prepare mapped fields. * @return array new fields */ public function computeMappedFields($mappedFields, $dao) { @@ -452,7 +456,8 @@ class CRM_Utils_Migrate_Export { } /** - * @param string $objectName business-entity/xml-tag name + * @param string $objectName + * Business-entity/xml-tag name. * @param CRM_Core_DAO $object * @param $mappedFields * @@ -548,8 +553,10 @@ class CRM_Utils_Migrate_Export { } /** - * @param string $name tag name - * @param string $value text + * @param string $name + * Tag name. + * @param string $value + * Text. * @param string $prefix * * @throws Exception diff --git a/CRM/Utils/Migrate/Import.php b/CRM/Utils/Migrate/Import.php index 6170c82e8e..f40e1cb54f 100644 --- a/CRM/Utils/Migrate/Import.php +++ b/CRM/Utils/Migrate/Import.php @@ -42,7 +42,8 @@ class CRM_Utils_Migrate_Import { /** * Import custom-data from an XML file * - * @param string $file path to an XML file + * @param string $file + * Path to an XML file. * @throws CRM_Core_Exception * @return void; */ diff --git a/CRM/Utils/Money.php b/CRM/Utils/Money.php index c02b55cead..01a63fdcba 100644 --- a/CRM/Utils/Money.php +++ b/CRM/Utils/Money.php @@ -49,11 +49,15 @@ class CRM_Utils_Money { * %C - the currency ISO code (e.g., 'USD') if provided * %c - the currency symbol (e.g., '$') if available * - * @param float $amount the monetary amount to display (1234.56) - * @param string $currency the three-letter ISO currency code ('USD') - * @param string $format the desired currency format + * @param float $amount + * The monetary amount to display (1234.56). + * @param string $currency + * The three-letter ISO currency code ('USD'). + * @param string $format + * The desired currency format. * @param bool $onlyNumber - * @param string $valueFormat the desired monetary value display format (e.g. '%!i') + * @param string $valueFormat + * The desired monetary value display format (e.g. '%!i'). * * @return string formatted monetary string * diff --git a/CRM/Utils/Network.php b/CRM/Utils/Network.php index bc98f34a47..2a4ddd6838 100644 --- a/CRM/Utils/Network.php +++ b/CRM/Utils/Network.php @@ -42,8 +42,10 @@ class CRM_Utils_Network { * * @param $host * @param $port - * @param int $serverStartupTimeOut seconds - * @param float $interval seconds to wait in between pollings + * @param int $serverStartupTimeOut + * Seconds. + * @param float $interval + * Seconds to wait in between pollings. * * @return bool TRUE if service is online */ diff --git a/CRM/Utils/Number.php b/CRM/Utils/Number.php index 343a73203d..783ae758e6 100644 --- a/CRM/Utils/Number.php +++ b/CRM/Utils/Number.php @@ -7,7 +7,8 @@ class CRM_Utils_Number { /** * Create a random number with a given precision * - * @param array $precision (int $significantDigits, int $postDecimalDigits) + * @param array $precision + * (int $significantDigits, int $postDecimalDigits). * * @return float * @link https://dev.mysql.com/doc/refman/5.1/en/fixed-point-types.html @@ -24,7 +25,8 @@ class CRM_Utils_Number { * and/or move the decimal place. * * @param int|float $keyValue - * @param array $precision (int $significantDigits, int $postDecimalDigits) + * @param array $precision + * (int $significantDigits, int $postDecimalDigits). * @return float * @link https://dev.mysql.com/doc/refman/5.1/en/fixed-point-types.html */ diff --git a/CRM/Utils/OpenFlashChart.php b/CRM/Utils/OpenFlashChart.php index 2e037fb51e..b98f02a193 100644 --- a/CRM/Utils/OpenFlashChart.php +++ b/CRM/Utils/OpenFlashChart.php @@ -54,7 +54,8 @@ class CRM_Utils_OpenFlashChart { /** * Build The Bar Gharph. * - * @param array $params assoc array of name/value pairs + * @param array $params + * Assoc array of name/value pairs. * * @return object $chart object of open flash chart. * @static @@ -183,7 +184,8 @@ class CRM_Utils_OpenFlashChart { /** * Build The Pie Gharph. * - * @param array $params assoc array of name/value pairs + * @param array $params + * Assoc array of name/value pairs. * * @return object $chart object of open flash chart. * @static @@ -246,7 +248,8 @@ class CRM_Utils_OpenFlashChart { /** * Build The 3-D Bar Gharph. * - * @param array $params assoc array of name/value pairs + * @param array $params + * Assoc array of name/value pairs. * * @return object $chart object of open flash chart. * @static diff --git a/CRM/Utils/OptionBag.php b/CRM/Utils/OptionBag.php index aa2fe8edbc..bf78937323 100644 --- a/CRM/Utils/OptionBag.php +++ b/CRM/Utils/OptionBag.php @@ -58,7 +58,8 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * (PHP 5 >= 5.0.0)
* Whether a offset exists * @link http://php.net/manual/en/arrayaccess.offsetexists.php - * @param mixed $offset

+ * @param mixed $offset + *

. * An offset to check for. *

* @return boolean true on success or false on failure. @@ -74,7 +75,8 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * (PHP 5 >= 5.0.0)
* Offset to retrieve * @link http://php.net/manual/en/arrayaccess.offsetget.php - * @param mixed $offset

+ * @param mixed $offset + *

. * The offset to retrieve. *

* @return mixed Can return all value types. @@ -87,10 +89,12 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * (PHP 5 >= 5.0.0)
* Offset to set * @link http://php.net/manual/en/arrayaccess.offsetset.php - * @param mixed $offset

+ * @param mixed $offset + *

. * The offset to assign the value to. *

- * @param mixed $value

+ * @param mixed $value + *

. * The value to set. *

* @return void @@ -103,7 +107,8 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * (PHP 5 >= 5.0.0)
* Offset to unset * @link http://php.net/manual/en/arrayaccess.offsetunset.php - * @param mixed $offset

+ * @param mixed $offset + *

. * The offset to unset. *

* @return void diff --git a/CRM/Utils/PDF/Label.php b/CRM/Utils/PDF/Label.php index cd8f3cd38e..9deee255d6 100644 --- a/CRM/Utils/PDF/Label.php +++ b/CRM/Utils/PDF/Label.php @@ -93,7 +93,8 @@ class CRM_Utils_PDF_Label extends TCPDF { /** * Constructor * - * @param $format Either the name of a Label Format in the Option Value table + * @param $format + * Either the name of a Label Format in the Option Value table. * or an array of Label Format values. * @param string|\Unit $unit Unit of measure for the PDF document * diff --git a/CRM/Utils/Pager.php b/CRM/Utils/Pager.php index aa184a1469..a83b1dee57 100644 --- a/CRM/Utils/Pager.php +++ b/CRM/Utils/Pager.php @@ -132,7 +132,8 @@ class CRM_Utils_Pager extends Pager_Sliding { * Helper function to assign remaining pager options as good default * values * - * @param array $params the set of options needed to initialize the parent + * @param array $params + * The set of options needed to initialize the parent. * constructor * * @@ -189,7 +190,8 @@ class CRM_Utils_Pager extends Pager_Sliding { * POST over-rides a GET, a POST at the top overrides * a POST at the bottom (of the page) * - * @param int $defaultPageId defaultPageId current pageId + * @param int $defaultPageId + * DefaultPageId current pageId. * * @param array $params * @@ -222,7 +224,8 @@ class CRM_Utils_Pager extends Pager_Sliding { /** * Get the number of rows to display from either a GET / POST variable * - * @param int $defaultPageRowCount the default value if not set + * @param int $defaultPageRowCount + * The default value if not set. * * @return int the rowCount value to use * diff --git a/CRM/Utils/PagerAToZ.php b/CRM/Utils/PagerAToZ.php index 73a355a14e..40d169db83 100644 --- a/CRM/Utils/PagerAToZ.php +++ b/CRM/Utils/PagerAToZ.php @@ -42,8 +42,10 @@ class CRM_Utils_PagerAToZ { /** * Returns the alphabetic array for sorting by character * - * @param array $query The query object - * @param string $sortByCharacter The character that we are potentially sorting on + * @param array $query + * The query object. + * @param string $sortByCharacter + * The character that we are potentially sorting on. * * @param bool $isDAO * @@ -96,8 +98,10 @@ class CRM_Utils_PagerAToZ { /** * Create the links * - * @param array $query The form values for search - * @param string $sortByCharacter The character that we are potentially sorting on + * @param array $query + * The form values for search. + * @param string $sortByCharacter + * The character that we are potentially sorting on. * * @param $isDAO * diff --git a/CRM/Utils/PseudoConstant.php b/CRM/Utils/PseudoConstant.php index 466a8bf2ef..f3cbe17590 100644 --- a/CRM/Utils/PseudoConstant.php +++ b/CRM/Utils/PseudoConstant.php @@ -95,7 +95,8 @@ class CRM_Utils_PseudoConstant { * If there's a full, preloaded map, use it. Otherwise, use search * class space. * - * @param string $constant constant-name + * @param string $constant + * Constant-name. * * @return string|NULL class-name */ diff --git a/CRM/Utils/QueryFormatter.php b/CRM/Utils/QueryFormatter.php index cc3a382748..6dde078dbd 100644 --- a/CRM/Utils/QueryFormatter.php +++ b/CRM/Utils/QueryFormatter.php @@ -89,7 +89,8 @@ class CRM_Utils_QueryFormatter { protected $mode; /** - * @param string $mode eg MODE_NONE + * @param string $mode + * Eg MODE_NONE. */ public function __construct($mode) { $this->mode = $mode; @@ -111,7 +112,8 @@ class CRM_Utils_QueryFormatter { /** * @param string $text - * @param string $language eg LANG_SQL_LIKE, LANG_SQL_FTS, LANG_SOLR + * @param string $language + * Eg LANG_SQL_LIKE, LANG_SQL_FTS, LANG_SOLR. * @throws CRM_Core_Exception * @return string */ @@ -266,8 +268,10 @@ class CRM_Utils_QueryFormatter { } /** - * @param string $text user-supplied query string - * @param string $template a prototypical description of each word, eg "word%" or "word*" or "*word*" + * @param string $text + * User-supplied query string. + * @param string $template + * A prototypical description of each word, eg "word%" or "word*" or "*word*". * @return string */ protected function mapWords($text, $template) { diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index 5250e8676e..6b6116bccd 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -61,7 +61,8 @@ class CRM_Utils_REST { /** * Simple ping function to test for liveness. * - * @param string $var The string to be echoed + * @param string $var + * The string to be echoed. * * @return string $var */ diff --git a/CRM/Utils/Recent.php b/CRM/Utils/Recent.php index 0c174c9946..de9c94e8d1 100644 --- a/CRM/Utils/Recent.php +++ b/CRM/Utils/Recent.php @@ -84,9 +84,12 @@ class CRM_Utils_Recent { /** * Add an item to the recent stack * - * @param string $title the title to display - * @param string $url the link for the above title - * @param string $id object id + * @param string $title + * The title to display. + * @param string $url + * The link for the above title. + * @param string $id + * Object id. * @param $type * @param int $contactId * @param string $contactName @@ -146,7 +149,8 @@ class CRM_Utils_Recent { /** * Delete an item from the recent stack * - * @param array $recentItem array of the recent Item to be removed + * @param array $recentItem + * Array of the recent Item to be removed. * * @return void * @static @@ -173,7 +177,8 @@ class CRM_Utils_Recent { /** * Delete an item from the recent stack * - * @param string $id contact id that had to be removed + * @param string $id + * Contact id that had to be removed. * * @return void * @static diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 50f0e60c85..d1dc1d0b62 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -222,7 +222,8 @@ class CRM_Utils_Rule { * specified has to be beyond today. (i.e today or later) * * @param array $date - * @param bool $monthRequired check whether month is mandatory + * @param bool $monthRequired + * Check whether month is mandatory. * * @return bool true if valid date * @static @@ -554,7 +555,7 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is ascii * - * @param array Uploaded file info (from $_FILES) + * @param array Uploaded file info (from $_FILES) * * @return bool true if file has been uploaded, false otherwise */ @@ -570,7 +571,7 @@ class CRM_Utils_Rule { /** * Checks to make sure the uploaded file is in UTF-8, recodes if it's not * - * @param array Uploaded file info (from $_FILES) + * @param array Uploaded file info (from $_FILES) * * @return bool whether file has been uploaded properly and is now in UTF-8 */ @@ -599,7 +600,7 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is html * - * @param array Uploaded file info (from $_FILES) + * @param array Uploaded file info (from $_FILES) * * @return bool true if file has been uploaded, false otherwise */ @@ -615,8 +616,10 @@ class CRM_Utils_Rule { /** * Check if there is a record with the same name in the db * - * @param string $value the value of the field we are checking - * @param array $options the daoName and fieldName (optional ) + * @param string $value + * The value of the field we are checking. + * @param array $options + * The daoName and fieldName (optional ). * * @return boolean true if object exists * @static diff --git a/CRM/Utils/SQL/Insert.php b/CRM/Utils/SQL/Insert.php index f1419f79a5..e734a1acde 100644 --- a/CRM/Utils/SQL/Insert.php +++ b/CRM/Utils/SQL/Insert.php @@ -42,7 +42,8 @@ class CRM_Utils_SQL_Insert { /** * Create a new INSERT query * - * @param string $table table-name and optional alias + * @param string $table + * Table-name and optional alias. * @return CRM_Utils_SQL_Insert */ public static function into($table) { @@ -52,7 +53,8 @@ class CRM_Utils_SQL_Insert { /** * Create a new SELECT query * - * @param string $from table-name and optional alias + * @param string $from + * Table-name and optional alias. */ public function __construct($table) { $this->table = $table; diff --git a/CRM/Utils/SQL/Select.php b/CRM/Utils/SQL/Select.php index cc029a59bf..2e0d82351f 100644 --- a/CRM/Utils/SQL/Select.php +++ b/CRM/Utils/SQL/Select.php @@ -47,7 +47,8 @@ class CRM_Utils_SQL_Select { /** * Create a new SELECT query * - * @param string $from table-name and optional alias + * @param string $from + * Table-name and optional alias. * @return CRM_Utils_SQL_Select */ public static function from($from) { @@ -57,7 +58,8 @@ class CRM_Utils_SQL_Select { /** * Create a new SELECT query * - * @param string $from table-name and optional alias + * @param string $from + * Table-name and optional alias. */ public function __construct($from) { $this->from = $from; @@ -66,8 +68,10 @@ class CRM_Utils_SQL_Select { /** * Add a new JOIN clause * - * @param string $name the effective alias of the joined table - * @param string $expr the complete join expression (eg "INNER JOIN mytable myalias ON mytable.id = maintable.foo_id") + * @param string $name + * The effective alias of the joined table. + * @param string $expr + * The complete join expression (eg "INNER JOIN mytable myalias ON mytable.id = maintable.foo_id"). * @param array|null $args * @return CRM_Utils_SQL_Select */ diff --git a/CRM/Utils/Signer.php b/CRM/Utils/Signer.php index 36eefab27f..fb0d9a6876 100644 --- a/CRM/Utils/Signer.php +++ b/CRM/Utils/Signer.php @@ -60,8 +60,10 @@ class CRM_Utils_Signer { /** * Instantiate a signature-processor * - * @param $secret string, private - * @param $paramNames array, fields which should be part of the signature + * @param $secret + * String, private. + * @param $paramNames + * Array, fields which should be part of the signature. */ public function __construct($secret, $paramNames) { sort($paramNames); // ensure consistent serialization of payloads @@ -74,8 +76,10 @@ class CRM_Utils_Signer { /** * Generate a signature for a set of key-value pairs * - * @param $params array, key-value pairs - * @param $salt string, the salt (if known) or NULL (for auto-generated) + * @param $params + * Array, key-value pairs. + * @param $salt + * String, the salt (if known) or NULL (for auto-generated). * @return string, the full public token representing the signature */ public function sign($params, $salt = NULL) { @@ -105,8 +109,10 @@ class CRM_Utils_Signer { /** * Determine whether a token represents a proper signature for $params * - * @param $token string, the full public token representing the signature - * @param $params array, key-value pairs + * @param $token + * String, the full public token representing the signature. + * @param $params + * Array, key-value pairs. * * @throws Exception * @return bool, TRUE iff all $paramNames for the submitted validate($params) and the original sign($params) diff --git a/CRM/Utils/SoapServer.php b/CRM/Utils/SoapServer.php index ab596e59f3..c10f13ba9c 100644 --- a/CRM/Utils/SoapServer.php +++ b/CRM/Utils/SoapServer.php @@ -70,7 +70,8 @@ class CRM_Utils_SoapServer { /** * Simple ping function to test for liveness. * - * @param string $var The string to be echoed + * @param string $var + * The string to be echoed. * * @return string $var */ @@ -84,7 +85,8 @@ class CRM_Utils_SoapServer { /** * Verify a SOAP key * - * @param string $key The soap key generated by authenticate() + * @param string $key + * The soap key generated by authenticate(). * * @throws SoapFault * @return void @@ -114,8 +116,10 @@ class CRM_Utils_SoapServer { /** * Authentication wrapper to the UF Class * - * @param string $name Login name - * @param string $pass Password + * @param string $name + * Login name. + * @param string $pass + * Password. * * @param bool $loadCMSBootstrap * diff --git a/CRM/Utils/Sort.php b/CRM/Utils/Sort.php index 48c70df964..0ad600d4bd 100644 --- a/CRM/Utils/Sort.php +++ b/CRM/Utils/Sort.php @@ -116,8 +116,10 @@ class CRM_Utils_Sort { * key names of variable (which should be the same as the column name) * value: ascending or descending * - * @param mixed $vars - assoc array as described above - * @param string $defaultSortOrder - order to sort + * @param mixed $vars + * Assoc array as described above. + * @param string $defaultSortOrder + * Order to sort. * * @return \CRM_Utils_Sort @access public @@ -169,8 +171,10 @@ class CRM_Utils_Sort { /** * Create the sortID string to be used in the GET param * - * @param int $index the field index - * @param int $dir the direction of the sort + * @param int $index + * The field index. + * @param int $dir + * The direction of the sort. * * @return string the string to append to the url * @static @@ -182,7 +186,8 @@ class CRM_Utils_Sort { /** * Init the sort ID values in the object * - * @param string $defaultSortOrder the sort order to use by default + * @param string $defaultSortOrder + * The sort order to use by default. * * @return returns null if $url- (sort url) is not found */ @@ -218,7 +223,8 @@ class CRM_Utils_Sort { /** * Init the object * - * @param string $defaultSortOrder the sort order to use by default + * @param string $defaultSortOrder + * The sort order to use by default. * * @return void */ diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index e703b2ae2b..035bf4d8cd 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -51,7 +51,7 @@ class CRM_Utils_String { * Convert a display name into a potential variable * name that we could use in forms/code * - * @param name Name of the string + * @param name Name of the string * * @param int $maxLength * @@ -77,9 +77,12 @@ class CRM_Utils_String { * Given a string, replace all non alpha numeric characters and * spaces with the replacement character * - * @param string $name the name to be worked on - * @param string $char the character to use for non-valid chars - * @param int $len length of valid variables + * @param string $name + * The name to be worked on. + * @param string $char + * The character to use for non-valid chars. + * @param int $len + * Length of valid variables. * * * @return string returns the manipulated string @@ -124,8 +127,10 @@ class CRM_Utils_String { * * Takes a variable name and munges it randomly into another variable name * - * @param string $name Initial Variable Name - * @param int $len length of valid variables + * @param string $name + * Initial Variable Name. + * @param int $len + * Length of valid variables. * * @return string Randomized Variable Name * @static @@ -139,8 +144,9 @@ class CRM_Utils_String { * Takes a string and returns the last tuple of the string. * useful while converting file names to class names etc * - * @param string $string the input string - * @param \char|string $char $char the character used to demarcate the componets + * @param string $string + * The input string. + * @param \char|string $char $char the character used to demarcate the componets * * * @return string the last component @@ -160,9 +166,12 @@ class CRM_Utils_String { * Appends a name to a string and seperated by delimiter. * does the right thing for an empty string * - * @param string $str the string to be appended to - * @param string $delim the delimiter to use - * @param mixed $name the string (or array of strings) to append + * @param string $str + * The string to be appended to. + * @param string $delim + * The delimiter to use. + * @param mixed $name + * The string (or array of strings) to append. * * @return void * @static @@ -198,8 +207,10 @@ class CRM_Utils_String { /** * Determine if the string is composed only of ascii characters * - * @param string $str input string - * @param boolean $utf8 attempt utf8 match on failure (default yes) + * @param string $str + * Input string. + * @param bool $utf8 + * Attempt utf8 match on failure (default yes). * * @return boolean true if string is ascii * @static @@ -240,8 +251,10 @@ class CRM_Utils_String { * Determine the string replacements for redaction * on the basis of the regular expressions * - * @param string $str input string - * @param array $regexRules regular expression to be matched w/ replacements + * @param string $str + * Input string. + * @param array $regexRules + * Regular expression to be matched w/ replacements. * * @return array $match array of strings w/ corresponding redacted outputs * @static @@ -299,7 +312,8 @@ class CRM_Utils_String { /** * Determine if a string is composed only of utf8 characters * - * @param string $str input string + * @param string $str + * Input string. * @static * * @return boolean @@ -327,8 +341,10 @@ class CRM_Utils_String { /** * Determine if two href's are equivalent (fuzzy match) * - * @param string $url1 the first url to be matched - * @param string $url2 the second url to be matched against + * @param string $url1 + * The first url to be matched. + * @param string $url2 + * The second url to be matched against. * * @return boolean true if the urls match, else false * @static @@ -351,7 +367,8 @@ class CRM_Utils_String { /** * Extract variable values * - * @param mix $query this is basically url + * @param mix $query + * This is basically url. * * @return mix $v returns civicrm url (eg: civicrm/contact/search/...) * @static @@ -375,7 +392,8 @@ class CRM_Utils_String { /** * Translate a true/false/yes/no string to a 0 or 1 value * - * @param string $str the string to be translated + * @param string $str + * The string to be translated. * * @return boolean * @static @@ -394,7 +412,8 @@ class CRM_Utils_String { /** * Returns string '1' for a true/yes/1 string, and '0' for no/false/0 else returns false * - * @param string $str the string to be translated + * @param string $str + * The string to be translated. * * @return boolean * @static @@ -418,7 +437,8 @@ class CRM_Utils_String { /** * Convert a HTML string into a text one using html2text * - * @param string $html the string to be converted + * @param string $html + * The string to be converted. * * @return string the converted string * @static @@ -509,7 +529,8 @@ class CRM_Utils_String { * Given an ezComponents-parsed representation of * a text with alternatives return only the first one * - * @param string $full all alternatives as a long string (or some other text) + * @param string $full + * All alternatives as a long string (or some other text). * * @return string only the first alternative found (or the text without alternatives) */ @@ -531,7 +552,8 @@ class CRM_Utils_String { * Strip leading, trailing, double spaces from string * used for postal/greeting/addressee * - * @param string $string input string to be cleaned + * @param string $string + * Input string to be cleaned. * * @return string the cleaned string * @static @@ -544,9 +566,12 @@ class CRM_Utils_String { * This function is used to clean the URL 'path' variable that we use * to construct CiviCRM urls by removing characters from the path variable * - * @param string $string the input string to be sanitized - * @param array $search the characters to be sanitized - * @param string $replace the character to replace it with + * @param string $string + * The input string to be sanitized. + * @param array $search + * The characters to be sanitized. + * @param string $replace + * The character to replace it with. * * @return string the sanitized string * @static @@ -590,7 +615,8 @@ class CRM_Utils_String { * xss attacks. This is primarily used in public facing pages which * accept html as the input string * - * @param string $string the input string + * @param string $string + * The input string. * * @return string the cleaned up string * @static @@ -650,7 +676,8 @@ class CRM_Utils_String { * "cms:admin foo" => array("cms", "admin foo") * * @param $delim - * @param string $string e.g. "view all contacts". Syntax: "[prefix:]name" + * @param string $string + * E.g. "view all contacts". Syntax: "[prefix:]name". * @param null $defaultPrefix * * @return array (0 => string|NULL $prefix, 1 => string $value) @@ -668,9 +695,12 @@ class CRM_Utils_String { /** * This function will mask part of the the user portion of an Email address (everything before the @) * - * @param string $email the email address to be masked - * @param string $maskChar the character used for masking - * @param integer $percent the percentage of the user portion to be masked + * @param string $email + * The email address to be masked. + * @param string $maskChar + * The character used for masking. + * @param int $percent + * The percentage of the user portion to be masked. * * @return string returns the masked Email address */ @@ -690,9 +720,12 @@ class CRM_Utils_String { /** * This function compares two strings * - * @param string $strOne string one - * @param string $strTwo string two - * @param boolean $case boolean indicating whether you want the comparison to be case sensitive or not + * @param string $strOne + * String one. + * @param string $strTwo + * String two. + * @param bool $case + * Boolean indicating whether you want the comparison to be case sensitive or not. * * @return boolean TRUE (string are identical); FALSE (strings are not identical) */ @@ -727,7 +760,8 @@ class CRM_Utils_String { * (because most other odd characters are %-escaped in URLs; and %-escaped * strings don't need any extra escaping in HTML). * - * @param string $url URL with HTML entities + * @param string $url + * URL with HTML entities. * @return string URL without HTML entities */ public static function unstupifyUrl($htmlUrl) { diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index 59a12af1ca..f2cf53c4c1 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1262,7 +1262,7 @@ class CRM_Utils_System { * * @param string $page * Title of documentation wiki page. - * @param boolean $URLonly + * @param bool $URLonly * (optional) Whether to return URL only or full HTML link (default). * @param string $text * (optional) Text of HTML link (no effect if $URLonly = false). @@ -1833,7 +1833,8 @@ class CRM_Utils_System { * This function delegates the decision-making to (a) the hook system and * (b) the BAO system. * - * @param array $crudLinkSpec with keys: + * @param array $crudLinkSpec + * With keys:. * - action: int, CRM_Core_Action::UPDATE or CRM_Core_Action::VIEW [default: VIEW] * - entity_table: string, eg "civicrm_contact" * - entity_id: int diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index c56c371bc6..22f9c7f6ec 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -51,9 +51,12 @@ abstract class CRM_Utils_System_Base { * If we are using a theming system, invoke theme, else just print the * content * - * @param string $content the content that will be themed - * @param boolean $print are we displaying to the screen or bypassing theming? - * @param boolean $maintenance for maintenance mode + * @param string $content + * The content that will be themed. + * @param bool $print + * Are we displaying to the screen or bypassing theming?. + * @param bool $maintenance + * For maintenance mode. * * @throws Exception * @return string|null @@ -161,7 +164,8 @@ abstract class CRM_Utils_System_Base { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @static @@ -287,7 +291,8 @@ abstract class CRM_Utils_System_Base { /** * Get Unique Identifier from UserFramework system (CMS) - * @param object $user object as described by the User Framework + * @param object $user + * Object as described by the User Framework. * @return mixed $uniqueIdentifer Unique identifier from the user Framework system * */ @@ -295,7 +300,8 @@ abstract class CRM_Utils_System_Base { /** * Get User ID from UserFramework system (CMS) - * @param object $user object as described by the User Framework + * @param object $user + * Object as described by the User Framework. * @return mixed * */ @@ -351,7 +357,8 @@ abstract class CRM_Utils_System_Base { /** * Get Url to view user record - * @param integer $contactID Contact ID + * @param int $contactID + * Contact ID. * * @return string */ diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 8445519253..b79de49d79 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -41,8 +41,10 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Create a user in Drupal. * - * @param array $params associated array - * @param string $mail email id for cms user + * @param array $params + * Associated array. + * @param string $mail + * Email id for cms user. * * @return uid if user exists, false otherwise * @@ -121,9 +123,12 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Check if username and email exists in the drupal db * - * @param array $params array of name and mail values - * @param array $errors array of errors - * @param string $emailName field label for the 'email' + * @param array $params + * Array of name and mail values. + * @param array $errors + * Array of errors. + * @param string $emailName + * Field label for the 'email'. * * @return void */ @@ -177,7 +182,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * Get the drupal destination string. When this is passed in the * URL the user will be directed to it after filling in the drupal form * - * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned + * @param CRM_Core_Form $form + * Form object representing the 'current' form - to which the user will be returned. * @return string $destination destination value for URL * */ @@ -219,7 +225,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @static @@ -294,7 +301,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Append a string to the head of the html file * - * @param string $header the new string to be appended + * @param string $header + * The new string to be appended. * * @return void */ @@ -314,7 +322,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * Add a script file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -341,7 +350,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * Add an inline script * * @param $code: string, javascript code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -366,7 +376,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * Add a css file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -388,7 +399,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * Add an inline style * * @param $code: string, css code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -419,7 +431,8 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Figure out the post url for the form * - * @param mix $action the default action if one is pre-specified + * @param mix $action + * The default action if one is pre-specified. * * @return string the url to post the form */ @@ -435,9 +448,12 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { /** * Authenticate the user against the drupal db * - * @param string $name the user name - * @param string $password the password for the above user name - * @param boolean $loadCMSBootstrap load cms bootstrap? + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. + * @param bool $loadCMSBootstrap + * Load cms bootstrap?. * @param NULL|string $realPath filename of script * * @return mixed false if no auth @@ -572,7 +588,8 @@ AND u.status = 1 /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * */ public function setMessage($message) { @@ -643,10 +660,13 @@ AND u.status = 1 /** * Load drupal bootstrap * - * @param array $params Either uid, or name & pass. - * @param boolean $loadUser boolean Require CMS user load. - * @param boolean $throwError If true, print error on failure and exit. - * @param boolean|string $realPath path to script + * @param array $params + * Either uid, or name & pass. + * @param bool $loadUser + * Boolean Require CMS user load. + * @param bool $throwError + * If true, print error on failure and exit. + * @param bool|string $realPath path to script * * @return bool */ @@ -903,8 +923,10 @@ AND u.status = 1 * Find any users/roles/security-principals with the given permission * and replace it with one or more permissions. * - * @param $oldPerm string - * @param $newPerms array, strings + * @param $oldPerm + * String. + * @param $newPerms + * Array, strings. * * @return void */ @@ -935,8 +957,10 @@ AND u.status = 1 /** * Wrapper for og_membership creation * - * @param integer $ogID Organic Group ID - * @param integer $drupalID drupal User ID + * @param int $ogID + * Organic Group ID. + * @param int $drupalID + * Drupal User ID. */ public function og_membership_create($ogID, $drupalID){ if (function_exists('og_entity_query_alter')) { @@ -956,8 +980,10 @@ AND u.status = 1 /** * Wrapper for og_membership deletion * - * @param integer $ogID Organic Group ID - * @param integer $drupalID drupal User ID + * @param int $ogID + * Organic Group ID. + * @param int $drupalID + * Drupal User ID. */ public function og_membership_delete($ogID, $drupalID) { if (function_exists('og_entity_query_alter')) { diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index 2847fc5a9d..a088395f11 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -42,9 +42,12 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * If we are using a theming system, invoke theme, else just print the * content * - * @param string $content the content that will be themed - * @param boolean $print are we displaying to the screen or bypassing theming? - * @param boolean $maintenance for maintenance mode + * @param string $content + * The content that will be themed. + * @param bool $print + * Are we displaying to the screen or bypassing theming?. + * @param bool $maintenance + * For maintenance mode. * * @return void prints content on stdout */ @@ -74,8 +77,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Create a user in Drupal. * - * @param array $params associated array - * @param string $mail email id for cms user + * @param array $params + * Associated array. + * @param string $mail + * Email id for cms user. * * @return uid if user exists, false otherwise * @@ -140,9 +145,12 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Check if username and email exists in the drupal db * - * @param array $params array of name and mail values - * @param array $errors array of errors - * @param string $emailName field label for the 'email' + * @param array $params + * Array of name and mail values. + * @param array $errors + * Array of errors. + * @param string $emailName + * Field label for the 'email'. * * @return void */ @@ -212,7 +220,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Get the drupal destination string. When this is passed in the * URL the user will be directed to it after filling in the drupal form * - * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned + * @param CRM_Core_Form $form + * Form object representing the 'current' form - to which the user will be returned. * @return string $destination destination value for URL * */ @@ -311,7 +320,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Append a string to the head of the html file * - * @param string $head the new string to be appended + * @param string $head + * The new string to be appended. * * @return void */ @@ -323,7 +333,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Add a script file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -339,7 +350,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Add an inline script * * @param $code: string, javascript code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -355,7 +367,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Add a css file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -374,7 +387,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Add an inline style * * @param $code: string, css code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -400,7 +414,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Figure out the post url for the form * - * @param mix $action the default action if one is pre-specified + * @param mix $action + * The default action if one is pre-specified. * * @return string the url to post the form */ @@ -415,9 +430,12 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Authenticate the user against the drupal db * - * @param string $name the user name - * @param string $password the password for the above user name - * @param boolean $loadCMSBootstrap load cms bootstrap? + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. + * @param bool $loadCMSBootstrap + * Load cms bootstrap?. * @param NULL|string $realPath filename of script * * @return mixed false if no auth @@ -522,7 +540,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * */ public function setMessage($message) { @@ -584,10 +603,13 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Load drupal bootstrap * - * @param array $params Either uid, or name & pass. - * @param boolean $loadUser boolean Require CMS user load. - * @param boolean $throwError If true, print error on failure and exit. - * @param boolean|string $realPath path to script + * @param array $params + * Either uid, or name & pass. + * @param bool $loadUser + * Boolean Require CMS user load. + * @param bool $throwError + * If true, print error on failure and exit. + * @param bool|string $realPath path to script * * @return bool */ @@ -844,8 +866,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * Find any users/roles/security-principals with the given permission * and replace it with one or more permissions. * - * @param $oldPerm string - * @param $newPerms array, strings + * @param $oldPerm + * String. + * @param $newPerms + * Array, strings. * * @return void */ @@ -884,7 +908,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @static @@ -903,8 +928,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Wrapper for og_membership creation * - * @param integer $ogID Organic Group ID - * @param integer $drupalID drupal User ID + * @param int $ogID + * Organic Group ID. + * @param int $drupalID + * Drupal User ID. */ public function og_membership_create($ogID, $drupalID){ og_save_subscription( $ogID, $drupalID, array( 'is_active' => 1 ) ); @@ -913,8 +940,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { /** * Wrapper for og_membership deletion * - * @param integer $ogID Organic Group ID - * @param integer $drupalID drupal User ID + * @param int $ogID + * Organic Group ID. + * @param int $drupalID + * Drupal User ID. */ public function og_membership_delete($ogID, $drupalID) { og_delete_subscription( $ogID, $drupalID ); diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 3a3e50aa10..7aa8abd0ca 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -41,8 +41,10 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Create a user in Drupal. * - * @param array $params associated array - * @param string $mail email id for cms user + * @param array $params + * Associated array. + * @param string $mail + * Email id for cms user. * * @return uid if user exists, false otherwise * @@ -113,8 +115,10 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Update the Drupal user's email address. * - * @param integer $ufID User ID in CMS - * @param string $email Primary contact email address + * @param int $ufID + * User ID in CMS. + * @param string $email + * Primary contact email address. */ public function updateCMSName($ufID, $email) { $user = user_load($ufID); @@ -130,9 +134,12 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Check if username and email exists in the drupal db * - * @param array $params array of name and mail values - * @param array $errors errors - * @param string $emailName field label for the 'email' + * @param array $params + * Array of name and mail values. + * @param array $errors + * Errors. + * @param string $emailName + * Field label for the 'email'. * * * @return void @@ -175,7 +182,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * Get the drupal destination string. When this is passed in the * URL the user will be directed to it after filling in the drupal form * - * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned + * @param CRM_Core_Form $form + * Form object representing the 'current' form - to which the user will be returned. * @return string $destination destination value for URL * */ @@ -212,7 +220,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @static @@ -268,7 +277,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Append a string to the head of the html file * - * @param string $header the new string to be appended + * @param string $header + * The new string to be appended. * * @return void */ @@ -280,7 +290,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * Add a script file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -307,7 +318,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * Add an inline script * * @param $code: string, javascript code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -332,7 +344,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * Add a css file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -354,7 +367,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * Add an inline style * * @param $code: string, css code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -406,13 +420,20 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { } /** - * @param string $path The base path (eg. civicrm/search/contact) - * @param string $query The query string (eg. reset=1&cid=66) but html encoded(?) (optional) - * @param bool $absolute Produce an absolute including domain and protocol (optional) - * @param string $fragment A named anchor (optional) - * @param bool $htmlize Produce a html encoded url (optional) - * @param bool $frontend A joomla hack (unused) - * @param bool $forceBackend A joomla jack (unused) + * @param string $path + * The base path (eg. civicrm/search/contact). + * @param string $query + * The query string (eg. reset=1&cid=66) but html encoded(?) (optional). + * @param bool $absolute + * Produce an absolute including domain and protocol (optional). + * @param string $fragment + * A named anchor (optional). + * @param bool $htmlize + * Produce a html encoded url (optional). + * @param bool $frontend + * A joomla hack (unused). + * @param bool $forceBackend + * A joomla jack (unused). * @return string */ public function url($path = '', $query = '', $absolute = FALSE, $fragment = '', $htmlize = FALSE, $frontend = FALSE, $forceBackend = FALSE) { @@ -440,9 +461,12 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Authenticate the user against the drupal db * - * @param string $name the user name - * @param string $password the password for the above user name - * @param boolean $loadCMSBootstrap load cms bootstrap? + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. + * @param bool $loadCMSBootstrap + * Load cms bootstrap?. * @param NULL|string $realPath filename of script * * @return mixed false if no auth @@ -497,7 +521,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * */ public function setMessage($message) { @@ -519,10 +544,13 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { /** * Load drupal bootstrap * - * @param array $params Either uid, or name & pass. - * @param boolean $loadUser boolean Require CMS user load. - * @param boolean $throwError If true, print error on failure and exit. - * @param boolean|string $realPath path to script + * @param array $params + * Either uid, or name & pass. + * @param bool $loadUser + * Boolean Require CMS user load. + * @param bool $throwError + * If true, print error on failure and exit. + * @param bool|string $realPath path to script * * @return bool * @Todo Handle setting cleanurls configuration for CiviCRM? diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index e801dab712..289dcd2dea 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -127,7 +127,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { * @todo - this only provides a limited amount of flexiblity - it still expects a 'civicrm' folder with a 'drupal' folder * and is only flexible as to the name of the civicrm folder. * - * @param string $url potential resource url based on standard folder assumptions + * @param string $url + * Potential resource url based on standard folder assumptions. * @return string $url with civicrm-core directory appended if not standard civi dir */ public function appendCoreDirectoryToResourceBase($url) { @@ -142,15 +143,22 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Generate an internal CiviCRM URL (copied from DRUPAL/includes/common.inc#url) * - * @param $path string The path being linked to, such as "civicrm/add" - * @param $query string A query string to append to the link. - * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * @param $path + * String The path being linked to, such as "civicrm/add". + * @param $query + * String A query string to append to the link. + * @param $absolute + * Boolean Whether to force the output to be an absolute link (beginning with http:). * Useful for links that will be displayed outside the site, such as in an * RSS feed. - * @param $fragment string A fragment identifier (named anchor) to append to the link. - * @param $htmlize boolean whether to convert to html eqivalant - * @param $frontend boolean a gross joomla hack - * @param $forceBackend boolean a gross joomla hack + * @param $fragment + * String A fragment identifier (named anchor) to append to the link. + * @param $htmlize + * Boolean whether to convert to html eqivalant. + * @param $frontend + * Boolean a gross joomla hack. + * @param $forceBackend + * Boolean a gross joomla hack. * * @return string an HTML string containing a link to the given path. * @@ -216,7 +224,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Get User ID from UserFramework system (Drupal) - * @param object $user object as described by the CMS + * @param object $user + * Object as described by the CMS. * @return mixed */ public function getUserIDFromUserObject($user) { @@ -225,7 +234,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Get Unique Identifier from UserFramework system (CMS) - * @param object $user object as described by the User Framework + * @param object $user + * Object as described by the User Framework. * @return mixed $uniqueIdentifer Unique identifier from the user Framework system * */ @@ -252,7 +262,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Get Url to view user record - * @param integer $contactID Contact ID + * @param int $contactID + * Contact ID. * * @return string */ @@ -324,8 +335,10 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { * Find any users/roles/security-principals with the given permission * and replace it with one or more permissions. * - * @param $oldPerm string - * @param $newPerms array, strings + * @param $oldPerm + * String. + * @param $newPerms + * Array, strings. * * @return void */ @@ -466,7 +479,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Figure out the post url for the form * - * @param mix $action the default action if one is pre-specified + * @param mix $action + * The default action if one is pre-specified. * * @return string the url to post the form */ diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 3bbb4c50d2..dcd175a4f8 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -53,8 +53,10 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Create a user of Joomla. * - * @param array $params associated array - * @param string $mail email id for cms user + * @param array $params + * Associated array. + * @param string $mail + * Email id for cms user. * * @return uid if user exists, false otherwise * @@ -121,9 +123,12 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Check if username and email exists in the drupal db * - * @param array $params array of name and mail values - * @param array $errors array of errors - * @param string $emailName field label for the 'email' + * @param array $params + * Array of name and mail values. + * @param array $errors + * Array of errors. + * @param string $emailName + * Field label for the 'email'. * * @return void */ @@ -176,7 +181,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Sets the title of the page * - * @param string $title title to set + * @param string $title + * Title to set. * @param string $pageTitle * * @return void @@ -260,7 +266,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * Add a script file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -275,7 +282,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * Add an inline script * * @param $code: string, javascript code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -290,7 +298,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * Add a css file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -310,7 +319,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * Add an inline style * * @param $code: string, css code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -329,14 +339,20 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Generate an internal CiviCRM URL * - * @param $path string The path being linked to, such as "civicrm/add" - * @param $query string A query string to append to the link. - * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * @param $path + * String The path being linked to, such as "civicrm/add". + * @param $query + * String A query string to append to the link. + * @param $absolute + * Boolean Whether to force the output to be an absolute link (beginning with http:). * Useful for links that will be displayed outside the site, such as in an * RSS feed. - * @param $fragment string A fragment identifier (named anchor) to append to the link. - * @param $htmlize boolean whether to convert to html eqivalant - * @param $frontend boolean a gross joomla hack + * @param $fragment + * String A fragment identifier (named anchor) to append to the link. + * @param $htmlize + * Boolean whether to convert to html eqivalant. + * @param $frontend + * Boolean a gross joomla hack. * * @param bool $forceBackend * @@ -414,7 +430,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Figure out the post url for the form * - * @param $action the default action if one is pre-specified + * @param $action + * The default action if one is pre-specified. * * @return string the url to post the form */ @@ -431,7 +448,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Set the email address of the user * - * @param object $user handle to the user object + * @param object $user + * Handle to the user object. * * @return void */ @@ -445,9 +463,12 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Authenticate the user against the joomla db * - * @param string $name the user name - * @param string $password the password for the above user name - * @param $loadCMSBootstrap boolean load cms bootstrap? + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. + * @param $loadCMSBootstrap + * Boolean load cms bootstrap?. * * @return mixed false if no auth * array( @@ -543,7 +564,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Set a init session with user object * - * @param array $data array with user specific data + * @param array $data + * Array with user specific data. * */ public function setUserSession($data) { @@ -558,7 +580,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * */ public function setMessage($message) { @@ -613,8 +636,10 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Load joomla bootstrap * - * @param $params array with uid or name and password - * @param $loadUser boolean load cms user? + * @param $params + * Array with uid or name and password. + * @param $loadUser + * Boolean load cms user?. * @param bool|\throw $throwError throw error on failure? * @param null $realPath * @param bool $loadDefines @@ -698,7 +723,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { } /** * Get User ID from UserFramework system (Joomla) - * @param object $user object as described by the CMS + * @param object $user + * Object as described by the CMS. * @return mixed */ public function getUserIDFromUserObject($user) { @@ -707,7 +733,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Get Unique Identifier from UserFramework system (CMS) - * @param object $user object as described by the User Framework + * @param object $user + * Object as described by the User Framework. * @return mixed $uniqueIdentifer Unique identifier from the user Framework system * */ @@ -741,7 +768,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @static @@ -821,7 +849,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * Get Url to view user record - * @param integer $contactID Contact ID + * @param int $contactID + * Contact ID. * * @return string */ diff --git a/CRM/Utils/System/Soap.php b/CRM/Utils/System/Soap.php index 1c2465db2e..0b782b367c 100644 --- a/CRM/Utils/System/Soap.php +++ b/CRM/Utils/System/Soap.php @@ -47,7 +47,8 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Sets the title of the page * - * @param string $title title for page + * @param string $title + * Title for page. * @param $pageTitle * * @paqram string $pageTitle @@ -61,7 +62,8 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Given a permission string, check for access requirements * - * @param string $str the permission to check + * @param string $str + * The permission to check. * * @return boolean true if yes, else false * @static @@ -85,7 +87,8 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Append a string to the head of the html file * - * @param string $head the new string to be appended + * @param string $head + * The new string to be appended. * * @return void */ @@ -96,12 +99,16 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Generate an internal CiviCRM URL * - * @param $path string The path being linked to, such as "civicrm/add" - * @param $query string A query string to append to the link. - * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * @param $path + * String The path being linked to, such as "civicrm/add". + * @param $query + * String A query string to append to the link. + * @param $absolute + * Boolean Whether to force the output to be an absolute link (beginning with http:). * Useful for links that will be displayed outside the site, such as in an * RSS feed. - * @param $fragment string A fragment identifier (named anchor) to append to the link. + * @param $fragment + * String A fragment identifier (named anchor) to append to the link. * * @return string an HTML string containing a link to the given path. * @@ -131,7 +138,8 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Set the email address of the user * - * @param object $user handle to the user object + * @param object $user + * Handle to the user object. * * @return void */ @@ -140,8 +148,10 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Authenticate a user against the real UF * - * @param string $name Login name - * @param string $pass Login password + * @param string $name + * Login name. + * @param string $pass + * Login password. * * @return array Result array */ @@ -182,7 +192,8 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @throws Exception * @return string - loginURL for the current CMS diff --git a/CRM/Utils/System/UnitTests.php b/CRM/Utils/System/UnitTests.php index 67a6b3f4ae..434edfd071 100644 --- a/CRM/Utils/System/UnitTests.php +++ b/CRM/Utils/System/UnitTests.php @@ -66,9 +66,12 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Authenticate the user against the drupal db * - * @param string $name the user name - * @param string $password the password for the above user name - * @param boolean $loadCMSBootstrap load cms bootstrap? + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. + * @param bool $loadCMSBootstrap + * Load cms bootstrap?. * @param NULL|string $realPath filename of script * * @return mixed false if no auth @@ -112,7 +115,8 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Append a string to the head of the html file * - * @param string $header the new string to be appended + * @param string $header + * The new string to be appended. * * @return void */ @@ -131,7 +135,8 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Figure out the post url for the form * - * @param mix $action the default action if one is pre-specified + * @param mix $action + * The default action if one is pre-specified. * * @return string the url to post the form */ @@ -147,15 +152,22 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Generate an internal CiviCRM URL (copied from DRUPAL/includes/common.inc#url) * - * @param $path string The path being linked to, such as "civicrm/add" - * @param $query string A query string to append to the link. - * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * @param $path + * String The path being linked to, such as "civicrm/add". + * @param $query + * String A query string to append to the link. + * @param $absolute + * Boolean Whether to force the output to be an absolute link (beginning with http:). * Useful for links that will be displayed outside the site, such as in an * RSS feed. - * @param $fragment string A fragment identifier (named anchor) to append to the link. - * @param $htmlize boolean whether to convert to html eqivalant - * @param $frontend boolean a gross joomla hack - * @param $forceBackend boolean a gross joomla hack + * @param $fragment + * String A fragment identifier (named anchor) to append to the link. + * @param $htmlize + * Boolean whether to convert to html eqivalant. + * @param $frontend + * Boolean a gross joomla hack. + * @param $forceBackend + * Boolean a gross joomla hack. * * @return string an HTML string containing a link to the given path. * @@ -251,7 +263,8 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * */ /** @@ -297,7 +310,8 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @throws Exception * @return string - loginURL for the current CMS diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index a656a44be1..03365f2ece 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -143,7 +143,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Append a string to the head of the html file * - * @param string $head the new string to be appended + * @param string $head + * The new string to be appended. * * @return void * @static @@ -172,7 +173,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * Add a script file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -187,7 +189,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * Add an inline script * * @param $code: string, javascript code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -202,7 +205,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * Add a css file * * @param $url: string, absolute path to file - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -217,7 +221,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { * Add an inline style * * @param $code: string, css code - * @param $region string, location within the document: 'html-header', 'page-header', 'page-footer' + * @param $region + * String, location within the document: 'html-header', 'page-header', 'page-footer'. * * Note: This function is not to be called directly * @see CRM_Core_Region::render() @@ -244,7 +249,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Figure out the post url for the form * - * @param mix $action the default action if one is pre-specified + * @param mix $action + * The default action if one is pre-specified. * * @return string the url to post the form * @static @@ -260,14 +266,20 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Generate an internal CiviCRM URL (copied from DRUPAL/includes/common.inc#url) * - * @param $path string The path being linked to, such as "civicrm/add" - * @param $query string A query string to append to the link. - * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * @param $path + * String The path being linked to, such as "civicrm/add". + * @param $query + * String A query string to append to the link. + * @param $absolute + * Boolean Whether to force the output to be an absolute link (beginning with http:). * Useful for links that will be displayed outside the site, such as in an * RSS feed. - * @param $fragment string A fragment identifier (named anchor) to append to the link. - * @param $htmlize boolean whether to convert to html eqivalant - * @param $frontend boolean a gross joomla hack + * @param $fragment + * String A fragment identifier (named anchor) to append to the link. + * @param $htmlize + * Boolean whether to convert to html eqivalant. + * @param $frontend + * Boolean a gross joomla hack. * * @param bool $forceBackend * @@ -380,8 +392,10 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Authenticate the user against the wordpress db * - * @param string $name the user name - * @param string $password the password for the above user name + * @param string $name + * The user name. + * @param string $password + * The password for the above user name. * * @param bool $loadCMSBootstrap * @param null $realPath @@ -416,7 +430,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Set a message in the UF to display to a user * - * @param string $message the message to set + * @param string $message + * The message to set. * * @static */ @@ -470,8 +485,10 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Load wordpress bootstrap * - * @param $name string optional username for login - * @param $pass string optional password for login + * @param $name + * String optional username for login. + * @param $pass + * String optional password for login. * * @return bool */ @@ -596,8 +613,10 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Change user name in host CMS * - * @param integer $ufID User ID in CMS - * @param string $ufName User name + * @param int $ufID + * User ID in CMS. + * @param string $ufName + * User name. */ public function updateCMSName($ufID, $ufName) { // CRM-10620 @@ -693,7 +712,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Get User ID from UserFramework system (Joomla) - * @param object $user object as described by the CMS + * @param object $user + * Object as described by the CMS. * @return mixed */ public function getUserIDFromUserObject($user) { @@ -702,7 +722,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Get Unique Identifier from UserFramework system (CMS) - * @param object $user object as described by the User Framework + * @param object $user + * Object as described by the User Framework. * @return mixed $uniqueIdentifer Unique identifier from the user Framework system * */ @@ -713,7 +734,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Get user login URL for hosting CMS (method declared in each CMS system class) * - * @param string $destination - if present, add destination to querystring (works for Drupal only) + * @param string $destination + * If present, add destination to querystring (works for Drupal only). * * @return string - loginURL for the current CMS * @@ -757,7 +779,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * Get Url to view user record - * @param integer $contactID Contact ID + * @param int $contactID + * Contact ID. * * @return string */ diff --git a/CRM/Utils/Time.php b/CRM/Utils/Time.php index 2f5b31d39b..88e709998d 100644 --- a/CRM/Utils/Time.php +++ b/CRM/Utils/Time.php @@ -46,7 +46,8 @@ class CRM_Utils_Time { /** * Get the time * - * @param string $returnFormat format in which date is to be retrieved + * @param string $returnFormat + * Format in which date is to be retrieved. * * @return date * @@ -68,8 +69,10 @@ class CRM_Utils_Time { /** * Set the given time * - * @param string $newDateTime a date formatted with strtotime - * @param string $returnFormat format in which date is to be retrieved + * @param string $newDateTime + * A date formatted with strtotime. + * @param string $returnFormat + * Format in which date is to be retrieved. * * @return date * @@ -91,9 +94,12 @@ class CRM_Utils_Time { * Approximate time-comparison. $a and $b are considered equal if they * are within $threshold seconds of each other. * - * @param string $a time which can be parsed by strtotime - * @param string $b time which can be parsed by strtotime - * @param int $threshold maximum allowed difference (in seconds) + * @param string $a + * Time which can be parsed by strtotime. + * @param string $b + * Time which can be parsed by strtotime. + * @param int $threshold + * Maximum allowed difference (in seconds). * @return bool */ public static function isEqual($a, $b, $threshold = 0) { diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index 79175125ed..f914c45090 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -93,7 +93,8 @@ class CRM_Utils_Token { /** * Check a string (mailing body) for required tokens. * - * @param string $str The message + * @param string $str + * The message. * * @return true|array true if all required tokens are found, * else an array of the missing tokens @@ -143,9 +144,12 @@ class CRM_Utils_Token { /** * Wrapper for token matching * - * @param string $type The token type (domain,mailing,contact,action) - * @param string $var The token variable - * @param string $str The string to search + * @param string $type + * The token type (domain,mailing,contact,action). + * @param string $var + * The token variable. + * @param string $str + * The string to search. * * @return boolean Was there a match * @static @@ -158,9 +162,12 @@ class CRM_Utils_Token { /** * Wrapper for token replacing * - * @param string $type The token type - * @param string $var The token variable - * @param string $value The value to substitute for the token + * @param string $type + * The token type. + * @param string $var + * The token variable. + * @param string $value + * The value to substitute for the token. * @param string (reference) $str The string to replace in * * @param bool $escapeSmarty @@ -183,7 +190,8 @@ class CRM_Utils_Token { /** * Get< the regex for token replacement * - * @param string $token_type a string indicating the the type of token to be used in the expression + * @param string $token_type + * A string indicating the the type of token to be used in the expression. * * @return string regular expression sutiable for using in preg_replace * @static @@ -195,7 +203,8 @@ class CRM_Utils_Token { /** * Escape the string so a malicious user cannot inject smarty code into the template * - * @param string $string a string that needs to be escaped from smarty parsing + * @param string $string + * A string that needs to be escaped from smarty parsing. * * @return string the escaped string * @static @@ -208,9 +217,12 @@ class CRM_Utils_Token { /** * Replace all the domain-level tokens in $str * - * @param string $str The string with tokens to be replaced - * @param object $domain The domain BAO - * @param boolean $html Replace tokens with HTML or plain text + * @param string $str + * The string with tokens to be replaced. + * @param object $domain + * The domain BAO. + * @param bool $html + * Replace tokens with HTML or plain text. * * @param null $knownTokens * @param bool $escapeSmarty @@ -306,9 +318,12 @@ class CRM_Utils_Token { /** * Replace all the org-level tokens in $str * - * @param string $str The string with tokens to be replaced - * @param object $org Associative array of org properties - * @param boolean $html Replace tokens with HTML or plain text + * @param string $str + * The string with tokens to be replaced. + * @param object $org + * Associative array of org properties. + * @param bool $html + * Replace tokens with HTML or plain text. * * @param bool $escapeSmarty * @@ -385,9 +400,12 @@ class CRM_Utils_Token { /** * Replace all mailing tokens in $str * - * @param string $str The string with tokens to be replaced - * @param object $mailing The mailing BAO, or null for validation - * @param boolean $html Replace tokens with HTML or plain text + * @param string $str + * The string with tokens to be replaced. + * @param object $mailing + * The mailing BAO, or null for validation. + * @param bool $html + * Replace tokens with HTML or plain text. * * @param null $knownTokens * @param bool $escapeSmarty @@ -513,11 +531,16 @@ class CRM_Utils_Token { /** * Replace all action tokens in $str * - * @param string $str The string with tokens to be replaced - * @param array $addresses Assoc. array of VERP event addresses - * @param array $urls Assoc. array of action URLs - * @param boolean $html Replace tokens with HTML or plain text - * @param array $knownTokens A list of tokens that are known to exist in the email body + * @param string $str + * The string with tokens to be replaced. + * @param array $addresses + * Assoc. array of VERP event addresses. + * @param array $urls + * Assoc. array of action URLs. + * @param bool $html + * Replace tokens with HTML or plain text. + * @param array $knownTokens + * A list of tokens that are known to exist in the email body. * * @param bool $escapeSmarty * @@ -601,11 +624,16 @@ class CRM_Utils_Token { * Replace all the contact-level tokens in $str with information from * $contact. * - * @param string $str The string with tokens to be replaced - * @param array $contact Associative array of contact properties - * @param boolean $html Replace tokens with HTML or plain text - * @param array $knownTokens A list of tokens that are known to exist in the email body - * @param boolean $returnBlankToken return unevaluated token if value is null + * @param string $str + * The string with tokens to be replaced. + * @param array $contact + * Associative array of contact properties. + * @param bool $html + * Replace tokens with HTML or plain text. + * @param array $knownTokens + * A list of tokens that are known to exist in the email body. + * @param bool $returnBlankToken + * Return unevaluated token if value is null. * * @param bool $escapeSmarty * @@ -743,10 +771,13 @@ class CRM_Utils_Token { * Replace all the hook tokens in $str with information from * $contact. * - * @param string $str The string with tokens to be replaced - * @param array $contact Associative array of contact properties (including hook token values) + * @param string $str + * The string with tokens to be replaced. + * @param array $contact + * Associative array of contact properties (including hook token values). * @param $categories - * @param boolean $html Replace tokens with HTML or plain text + * @param bool $html + * Replace tokens with HTML or plain text. * * @param bool $escapeSmarty * @@ -836,12 +867,17 @@ class CRM_Utils_Token { /** * Replace unsubscribe tokens * - * @param string $str the string with tokens to be replaced - * @param object $domain The domain BAO - * @param array $groups The groups (if any) being unsubscribed - * @param boolean $html Replace tokens with html or plain text - * @param int $contact_id The contact ID - * @param string hash The security hash of the unsub event + * @param string $str + * The string with tokens to be replaced. + * @param object $domain + * The domain BAO. + * @param array $groups + * The groups (if any) being unsubscribed. + * @param bool $html + * Replace tokens with html or plain text. + * @param int $contact_id + * The contact ID. + * @param string hash The security hash of the unsub event * * @return string The processed string * @static @@ -877,12 +913,17 @@ class CRM_Utils_Token { /** * Replace resubscribe tokens * - * @param string $str the string with tokens to be replaced - * @param object $domain The domain BAO - * @param array $groups The groups (if any) being resubscribed - * @param boolean $html Replace tokens with html or plain text - * @param int $contact_id The contact ID - * @param string hash The security hash of the resub event + * @param string $str + * The string with tokens to be replaced. + * @param object $domain + * The domain BAO. + * @param array $groups + * The groups (if any) being resubscribed. + * @param bool $html + * Replace tokens with html or plain text. + * @param int $contact_id + * The contact ID. + * @param string hash The security hash of the resub event * * @return string The processed string * @static @@ -902,10 +943,13 @@ class CRM_Utils_Token { /** * Replace subscription-confirmation-request tokens * - * @param string $str The string with tokens to be replaced - * @param string $group The name of the group being subscribed + * @param string $str + * The string with tokens to be replaced. + * @param string $group + * The name of the group being subscribed. * @param $url - * @param boolean $html Replace tokens with html or plain text + * @param bool $html + * Replace tokens with html or plain text. * * @return string The processed string * @static @@ -923,7 +967,8 @@ class CRM_Utils_Token { /** * Replace subscription-invitation tokens * - * @param string $str The string with tokens to be replaced + * @param string $str + * The string with tokens to be replaced. * * @return string The processed string * @static @@ -965,9 +1010,12 @@ class CRM_Utils_Token { /** * Replace welcome/confirmation tokens * - * @param string $str The string with tokens to be replaced - * @param string $group The name of the group being subscribed - * @param boolean $html Replace tokens with html or plain text + * @param string $str + * The string with tokens to be replaced. + * @param string $group + * The name of the group being subscribed. + * @param bool $html + * Replace tokens with html or plain text. * * @return string The processed string * @static @@ -982,7 +1030,8 @@ class CRM_Utils_Token { /** * Find unprocessed tokens (call this last) * - * @param string $str The string to search + * @param string $str + * The string to search. * * @return array Array of tokens that weren't replaced * @static @@ -996,9 +1045,12 @@ class CRM_Utils_Token { /** * Find and replace tokens for each component * - * @param string $str The string to search - * @param array $contact Associative array of contact properties - * @param array $components A list of tokens that are known to exist in the email body + * @param string $str + * The string to search. + * @param array $contact + * Associative array of contact properties. + * @param array $components + * A list of tokens that are known to exist in the email body. * * @param bool $escapeSmarty * @param bool $returnEmptyToken @@ -1032,7 +1084,8 @@ class CRM_Utils_Token { /** * Get array of string tokens * - * @param $string the input string to parse for tokens + * @param $string + * The input string to parse for tokens. * * @return array $tokens array of tokens mentioned in field@access public * @static @@ -1092,13 +1145,19 @@ class CRM_Utils_Token { * can iterate in a nice loop and do token evaluation * * @param $contactIDs - * @param array $returnProperties of required properties - * @param boolean $skipOnHold don't return on_hold contact info also. - * @param boolean $skipDeceased don't return deceased contact info. - * @param array $extraParams extra params - * @param array $tokens the list of tokens we've extracted from the content + * @param array $returnProperties + * Of required properties. + * @param boolean $skipOnHold + * Don't return on_hold contact info also. + * @param boolean $skipDeceased + * Don't return deceased contact info. + * @param array $extraParams + * Extra params. + * @param array $tokens + * The list of tokens we've extracted from the content. * @param null $className - * @param int $jobID the mailing list jobID - this is a legacy param + * @param int $jobID + * The mailing list jobID - this is a legacy param. * * @return array * @static @@ -1217,14 +1276,16 @@ class CRM_Utils_Token { * Call hooks on tokens for anonymous users - contact id is set to 0 - this allows non-contact * specific tokens to be rendered * - * @param array $contactIDs - this should always be array(0) or its not anonymous - left to keep signature same + * @param array $contactIDs + * This should always be array(0) or its not anonymous - left to keep signature same. * as main fn * @param string $returnProperties - * @param boolean $skipOnHold - * @param boolean $skipDeceased + * @param bool $skipOnHold + * @param bool $skipDeceased * @param string $extraParams * @param array $tokens - * @param string $className sent as context to the hook + * @param string $className + * Sent as context to the hook. * @param string $jobID * @return array contactDetails with hooks swapped out */ @@ -1252,9 +1313,12 @@ class CRM_Utils_Token { * can iterate in a nice loop and do token evaluation * * @param array $contributionIDs - * @param array $returnProperties of required properties - * @param array $extraParams extra params - * @param array $tokens the list of tokens we've extracted from the content + * @param array $returnProperties + * Of required properties. + * @param array $extraParams + * Extra params. + * @param array $tokens + * The list of tokens we've extracted from the content. * @param string $className * * @return array @@ -1312,7 +1376,8 @@ class CRM_Utils_Token { /** * Get Membership Token Details - * @param array $membershipIDs array of membership IDS + * @param array $membershipIDs + * Array of membership IDS. */ public static function getMembershipTokenDetails($membershipIDs) { $memberships = civicrm_api3('membership', 'get', array('options' => array('limit' => 200000), 'membership_id' => array('IN' => (array) $membershipIDs))); @@ -1423,7 +1488,8 @@ class CRM_Utils_Token { /** * Replace all user tokens in $str * - * @param string $str The string with tokens to be replaced + * @param string $str + * The string with tokens to be replaced. * * @param null $knownTokens * @param bool $escapeSmarty @@ -1507,10 +1573,13 @@ class CRM_Utils_Token { /** * Replace tokens for an entity * @param string $entity - * @param array $entityArray (e.g. in format from api) - * @param string $str string to replace in - * @param array $knownTokens array of tokens present - * @param boolean $escapeSmarty + * @param array $entityArray + * (e.g. in format from api). + * @param string $str + * String to replace in. + * @param array $knownTokens + * Array of tokens present. + * @param bool $escapeSmarty * @return string string with replacements made */ public static function replaceEntityTokens($entity, $entityArray, $str, $knownTokens = array(), $escapeSmarty = FALSE) { @@ -1603,8 +1672,9 @@ class CRM_Utils_Token { * Get replacement strings for any membership tokens (only a small number of tokens are implemnted in the first instance * - this is used by the pdfLetter task from membership search * @param string $token - * @param array $membership an api result array for a single membership - * @param boolean $escapeSmarty + * @param array $membership + * An api result array for a single membership. + * @param bool $escapeSmarty * @return string token replacement */ public static function getMembershipTokenReplacement($token, $membership, $escapeSmarty = FALSE) { diff --git a/CRM/Utils/Tree.php b/CRM/Utils/Tree.php index 3996676473..82bee5ee61 100644 --- a/CRM/Utils/Tree.php +++ b/CRM/Utils/Tree.php @@ -105,7 +105,8 @@ class CRM_Utils_Tree { /** * Find a node that matches the given string * - * @param string $name name of the node we are searching for. + * @param string $name + * Name of the node we are searching for. * @param array (ref) $parentNode which parent node should we search in ? * * @return array( @@ -175,8 +176,9 @@ class CRM_Utils_Tree { /** * Add node * - * @param string $parentName - name of the parent ? - * @param array (ref) - node to be added + * @param string $parentName + * Name of the parent ?. + * @param array (ref) - node to be added * * @return void * @@ -191,9 +193,10 @@ class CRM_Utils_Tree { /** * Add Data * - * @param string $parentName - name of the parent ? - * @param mixed - data to be added - * @param string - key to be used (optional) + * @param string $parentName + * Name of the parent ?. + * @param mixed - data to be added + * @param string - key to be used (optional) * * @return void * diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php index af4082058a..19b2675cdb 100644 --- a/CRM/Utils/Type.php +++ b/CRM/Utils/Type.php @@ -149,7 +149,7 @@ class CRM_Utils_Type { * The value to be verified/escaped. * @param string $type * The type to verify against. - * @param boolean $abort + * @param bool $abort * If TRUE, the operation will CRM_Core_Error::fatal() on invalid data. * * @return mixed @@ -269,7 +269,7 @@ class CRM_Utils_Type { * The value to validate. * @param string $type * The type to validate against. - * @param boolean $abort + * @param bool $abort * If TRUE, the operation will CRM_Core_Error::fatal() on invalid data. * @name string $name * The name of the attribute diff --git a/CRM/Utils/Verp.php b/CRM/Utils/Verp.php index 6229edbbbe..0571544f1e 100644 --- a/CRM/Utils/Verp.php +++ b/CRM/Utils/Verp.php @@ -64,8 +64,10 @@ class CRM_Utils_Verp { /** * Encode the sender's address with the VERPed recipient. * - * @param string $sender The address of the sender - * @param string $recipient The address of the recipient + * @param string $sender + * The address of the sender. + * @param string $recipient + * The address of the recipient. * * @return string The VERP encoded address * @static @@ -90,7 +92,8 @@ class CRM_Utils_Verp { /** * Decode the address and return the sender and recipient as an array * - * @param string $address The address to be decoded + * @param string $address + * The address to be decoded. * * @return array The tuple ($sender, $recipient) * @static diff --git a/CRM/Utils/Weight.php b/CRM/Utils/Weight.php index 5ce5b7d3d3..53f10af11c 100644 --- a/CRM/Utils/Weight.php +++ b/CRM/Utils/Weight.php @@ -41,9 +41,12 @@ class CRM_Utils_Weight { /** * Correct duplicate weight entries by putting them (duplicate weights) in sequence. * - * @param string $daoName full name of the DAO - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which contains the weight value, + * @param string $daoName + * Full name of the DAO. + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which contains the weight value,. * defaults to 'weight' * * @return bool @@ -83,11 +86,14 @@ class CRM_Utils_Weight { /** * Remove a row from the specified weight, and shift all rows below it up * - * @param string $daoName full name of the DAO + * @param string $daoName + * Full name of the DAO. * $param integer $weight the weight to be removed * @param int $fieldID - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which contains the weight value, + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which contains the weight value,. * defaults to 'weight' * * @return bool @@ -117,11 +123,14 @@ class CRM_Utils_Weight { * And returns the new weight be used. If old-weight not present, Creates a gap for a new row to be inserted * at the specified new weight * - * @param string $daoName full name of the DAO - * @param integer $oldWeight - * @param integer $newWeight - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which contains the weight value, + * @param string $daoName + * Full name of the DAO. + * @param int $oldWeight + * @param int $newWeight + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which contains the weight value,. * defaults to 'weight' * * @return int @@ -183,9 +192,12 @@ class CRM_Utils_Weight { /** * Returns the new calculated weight. * - * @param string $daoName full name of the DAO - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which used to get the wt, default to 'weight'. + * @param string $daoName + * Full name of the DAO. + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which used to get the wt, default to 'weight'. * * @return integer */ @@ -221,9 +233,12 @@ class CRM_Utils_Weight { /** * Returns the highest weight. * - * @param string $daoName full name of the DAO - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which contains the weight value, + * @param string $daoName + * Full name of the DAO. + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which contains the weight value,. * defaults to 'weight' * * @return integer @@ -241,9 +256,12 @@ class CRM_Utils_Weight { /** * Returns the default weight ( highest weight + 1 ) to be used. * - * @param string $daoName full name of the DAO - * @param array $fieldValues field => value to be used in the WHERE - * @param string $weightField field which contains the weight value, + * @param string $daoName + * Full name of the DAO. + * @param array $fieldValues + * Field => value to be used in the WHERE. + * @param string $weightField + * Field which contains the weight value,. * defaults to 'weight' * * @return integer @@ -256,12 +274,17 @@ class CRM_Utils_Weight { /** * Execute a weight-related query * - * @param string $queryType SELECT, UPDATE, DELETE - * @param string $daoName full name of the DAO - * @param array $fieldValues field => value to be used in the WHERE - * @param string $queryData data to be used, dependent on the query type + * @param string $queryType + * SELECT, UPDATE, DELETE. + * @param string $daoName + * Full name of the DAO. + * @param array $fieldValues + * 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 optional ORDER BY field + * @param string $orderBy + * Optional ORDER BY field. * * @param null $groupBy * diff --git a/CRM/Utils/Wrapper.php b/CRM/Utils/Wrapper.php index a352dc5180..a5b1ac963e 100644 --- a/CRM/Utils/Wrapper.php +++ b/CRM/Utils/Wrapper.php @@ -53,11 +53,11 @@ class CRM_Utils_Wrapper { * The heart of the callback processing is done by this method. * forms are of different type and have different operations. * - * @param string formName name of the form processing this action - * @param string formLabel label for the above form - * @param int mode mode of operation. - * @param boolean addSequence should we add a unique sequence number to the end of the key - * @param boolean ignoreKey should we not set a qfKey for this controller (for standalone forms) + * @param string formName name of the form processing this action + * @param string formLabel label for the above form + * @param int mode mode of operation. + * @param bool addSequence should we add a unique sequence number to the end of the key + * @param bool ignoreKey should we not set a qfKey for this controller (for standalone forms) * * @return void. */ diff --git a/CRM/Utils/XML.php b/CRM/Utils/XML.php index fab753d951..093d52c549 100644 --- a/CRM/Utils/XML.php +++ b/CRM/Utils/XML.php @@ -119,7 +119,8 @@ class CRM_Utils_XML { /** * Convert an XML element to an array * - * @param $obj SimpleXMLElement + * @param $obj + * SimpleXMLElement. * * @return array */ diff --git a/CRM/Utils/Zip.php b/CRM/Utils/Zip.php index 60cbb2be10..a93ce02dfd 100644 --- a/CRM/Utils/Zip.php +++ b/CRM/Utils/Zip.php @@ -118,9 +118,12 @@ class CRM_Utils_Zip { * An inefficient helper for creating a ZIP file from data in memory. * This is only intended for building temp files for unit-testing. * - * @param $zipName string, file name - * @param $dirs array, list of directory paths - * @param $files array, keys are file names and values are file contents + * @param $zipName + * String, file name. + * @param $dirs + * Array, list of directory paths. + * @param $files + * Array, keys are file names and values are file contents. * @return bool */ static public function createTestZip($zipName, $dirs, $files) { -- 2.25.1