From 1054415fa1617511eaec3bac1c2847b2010527ff Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 11 Jan 2015 22:16:14 -0500 Subject: [PATCH] INFRA-132 - Comment format cleanup --- CRM/Case/Selector/Search.php | 6 +-- CRM/Contact/BAO/ProximityQuery.php | 44 ++++++++++++++----- .../Search/Custom/ContributionAggregate.php | 22 ++++++---- CRM/Contact/Selector.php | 12 +---- CRM/Contribute/Selector/Search.php | 6 +-- CRM/Core/Selector/Base.php | 6 ++- CRM/Event/Selector/Search.php | 6 +-- CRM/Grant/Selector/Search.php | 6 +-- CRM/Mailing/Selector/Search.php | 6 +-- CRM/Member/Selector/Search.php | 6 +-- CRM/Pledge/Selector/Search.php | 6 +-- 11 files changed, 59 insertions(+), 67 deletions(-) diff --git a/CRM/Case/Selector/Search.php b/CRM/Case/Selector/Search.php index 78b5e75f21..01463d3f03 100644 --- a/CRM/Case/Selector/Search.php +++ b/CRM/Case/Selector/Search.php @@ -412,12 +412,8 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base { } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Contact/BAO/ProximityQuery.php b/CRM/Contact/BAO/ProximityQuery.php index bf769928fe..64a3e85e0a 100644 --- a/CRM/Contact/BAO/ProximityQuery.php +++ b/CRM/Contact/BAO/ProximityQuery.php @@ -70,18 +70,19 @@ class CRM_Contact_BAO_ProximityQuery { } } - /** + /* * Latitudes in all of U. S.: from -7.2 (American Samoa) to 70.5 (Alaska). * Latitudes in continental U. S.: from 24.6 (Florida) to 49.0 (Washington). * Average latitude of all U. S. zipcodes: 37.9. */ - /* - /** - * Estimate the Earth's radius at a given latitude. - * Default to an approximate average radius for the United States. - */ - + /** + * Estimate the Earth's radius at a given latitude. + * Default to an approximate average radius for the United States. + * + * @param float $latitude + * @return float + */ public static function earthRadius($latitude) { $lat = deg2rad($latitude); @@ -93,6 +94,11 @@ class CRM_Contact_BAO_ProximityQuery { /** * Convert longitude and latitude to earth-centered earth-fixed coordinates. * X axis is 0 long, 0 lat; Y axis is 90 deg E; Z axis is north pole. + * + * @param float $longitude + * @param float $latitude + * @param float $height + * @return array */ public static function earthXYZ($longitude, $latitude, $height = 0) { $long = deg2rad($longitude); @@ -114,6 +120,10 @@ class CRM_Contact_BAO_ProximityQuery { /** * Convert a given angle to earth-surface distance. + * + * @param float $angle + * @param float $latitude + * @return float */ public static function earthArcLength($angle, $latitude) { return deg2rad($angle) * self::earthRadius($latitude); @@ -121,6 +131,11 @@ class CRM_Contact_BAO_ProximityQuery { /** * Estimate the min and max longitudes within $distance of a given location. + * + * @param float $longitude + * @param float $latitude + * @param float $distance + * @return array */ public static function earthLongitudeRange($longitude, $latitude, $distance) { $long = deg2rad($longitude); @@ -148,6 +163,11 @@ class CRM_Contact_BAO_ProximityQuery { /** * Estimate the min and max latitudes within $distance of a given location. + * + * @param float $longitude + * @param float $latitude + * @param float $distance + * @return array */ public static function earthLatitudeRange($longitude, $latitude, $distance) { $long = deg2rad($longitude); @@ -186,9 +206,9 @@ class CRM_Contact_BAO_ProximityQuery { } /** - * @param $latitude - * @param $longitude - * @param $distance + * @param float $longitude + * @param float $latitude + * @param float $distance * @param string $tablePrefix * * @return string @@ -243,7 +263,7 @@ ACOS( /** * @param $query - * @param $values + * @param array $values * * @throws Exception */ @@ -352,7 +372,7 @@ ACOS( } /** - * @param $input + * @param array $input */ public static function fixInputParams(&$input) { foreach ($input as $param) { diff --git a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index 8a0422d77a..7c8e246f16 100644 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -42,10 +42,8 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac */ public function __construct(&$formValues) { $this->_formValues = $formValues; - /** - * Define the columns for search result rows - */ + // Define the columns for search result rows $this->_columns = array( ts('Contact ID') => 'contact_id', ts('Name') => 'sort_name', @@ -99,6 +97,8 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac /** * Define the smarty template used to layout the search form and results listings. + * + * @return string */ public function templateFile() { return 'CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl'; @@ -106,6 +106,14 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac /** * Construct the search query + * + * @param int $offset + * @param int $rowcount + * @param string|object $sort + * @param bool $includeContactIDs + * @param bool $justIDs + * + * @return string */ function all( $offset = 0, $rowcount = 0, $sort = NULL, @@ -175,11 +183,9 @@ civicrm_contact AS contact_a "; } - /* - * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values - * - */ /** + * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values + * * @param bool $includeContactIDs * * @return string @@ -246,7 +252,7 @@ civicrm_contact AS contact_a return implode(' AND ', $clauses); } - /* + /** * Functions below generally don't need to be modified */ public function count() { diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index b870948a18..1a739ebe3f 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -1098,18 +1098,8 @@ SELECT DISTINCT 'civicrm_contact', contact_a.id, contact_a.id, '$cacheKey', cont } /** - * Given the current formValues, gets the query in local - * language - * - * @param array ( - * reference) $formValues submitted formValues - * - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Contribute/Selector/Search.php b/CRM/Contribute/Selector/Search.php index 2a0a97d92a..26f9982440 100644 --- a/CRM/Contribute/Selector/Search.php +++ b/CRM/Contribute/Selector/Search.php @@ -428,12 +428,8 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Core/Selector/Base.php b/CRM/Core/Selector/Base.php index 8f1ec0a27c..1674ec5873 100644 --- a/CRM/Core/Selector/Base.php +++ b/CRM/Core/Selector/Base.php @@ -159,7 +159,11 @@ class CRM_Core_Selector_Base { * Get the display text in plain language for the search * to display on the results page * - * @return string + * FIXME: the current internationalisation is bad, but should more or less work + * on most of "European" languages + * + * @return array + * array of strings */ public function getQill() { return NULL; diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index 0f05141ec3..954382d579 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -428,11 +428,7 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co } /** - * FIXME: the current internationalisation is bad, but should more or less work - * on most of "European" languages - * - * @return array - * which contains an array of strings + * @inheritDoc */ public function getQILL() { return $this->_query->qill(); diff --git a/CRM/Grant/Selector/Search.php b/CRM/Grant/Selector/Search.php index 234e81c688..f1e532cb6e 100644 --- a/CRM/Grant/Selector/Search.php +++ b/CRM/Grant/Selector/Search.php @@ -332,12 +332,8 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Mailing/Selector/Search.php b/CRM/Mailing/Selector/Search.php index 7df1476831..8865f2a730 100644 --- a/CRM/Mailing/Selector/Search.php +++ b/CRM/Mailing/Selector/Search.php @@ -328,12 +328,8 @@ class CRM_Mailing_Selector_Search extends CRM_Core_Selector_Base implements CRM_ } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index 03daae4bcb..e4927871bd 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -451,12 +451,8 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } diff --git a/CRM/Pledge/Selector/Search.php b/CRM/Pledge/Selector/Search.php index 133d2c260e..f6c4040db1 100644 --- a/CRM/Pledge/Selector/Search.php +++ b/CRM/Pledge/Selector/Search.php @@ -366,12 +366,8 @@ class CRM_Pledge_Selector_Search extends CRM_Core_Selector_Base { } /** - * @return array - * which contains an array of strings + * @inheritDoc */ - - // the current internationalisation is bad, but should more or less work - // for most of "European" languages public function getQILL() { return $this->_query->qill(); } -- 2.25.1