From 74ab7ba8fa3800d4b6138ad897b72f0d8d4f6c34 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Feb 2015 22:11:36 +1300 Subject: [PATCH] a few more comment fixes --- CRM/Contribute/BAO/Contribution.php | 19 +++++++++++++++---- CRM/Contribute/Controller/Search.php | 6 +++++- CRM/Contribute/Form/AdditionalPayment.php | 2 +- CRM/Contribute/Form/Contribution.php | 2 +- CRM/Contribute/Form/SoftCredit.php | 2 +- CRM/Contribute/Import/Field.php | 8 +++++++- CRM/Contribute/Import/Parser/Contribution.php | 15 ++++++++++++--- CRM/Contribute/StateMachine/Contribution.php | 2 +- 8 files changed, 43 insertions(+), 13 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 97d53a1dbe..030b140391 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -493,12 +493,18 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { } /** - * convert associative array names to values - * and vice-versa. + * Convert associative array names to values and vice-versa. * * This function is used by both the web form layer and the api. Note that * the api needs the name => value conversion, also the view layer typically * requires value => name conversion + * + * @param array $defaults + * @param string $property + * @param array $lookup + * @param bool $reverse + * + * @return bool */ public static function lookupValue(&$defaults, $property, &$lookup, $reverse) { $id = $property . '_id'; @@ -945,8 +951,7 @@ INNER JOIN civicrm_contact contact ON ( contact.id = civicrm_contribution.conta } /** - * Add extra fields specific to contribtion - * + * Add extra fields specific to contribution. */ public static function getSpecialContributionFields() { $extraFields = array( @@ -1383,6 +1388,12 @@ LEFT JOIN civicrm_contribution contribution ON ( componentPayment.contribution_ /** * Update contribution as well as related objects. + * + * @param array $params + * @param bool $processContributionObject + * + * @return array + * @throws \Exception */ public static function transitionComponents($params, $processContributionObject = FALSE) { // get minimum required values. diff --git a/CRM/Contribute/Controller/Search.php b/CRM/Contribute/Controller/Search.php index 9f8b11136e..fe1f7bb5d3 100644 --- a/CRM/Contribute/Controller/Search.php +++ b/CRM/Contribute/Controller/Search.php @@ -47,7 +47,11 @@ class CRM_Contribute_Controller_Search extends CRM_Core_Controller { /** - * Class constructor + * Class constructor. + * + * @param string $title + * @param bool|int $action + * @param bool $modal */ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 61101dac20..0fd2c8091d 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -11,7 +11,7 @@ | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | - | CiviCRM is distributed in the hope that it will be usefusul, but | + | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index e19f9068b0..5824a75775 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -11,7 +11,7 @@ | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | - | CiviCRM is distributed in the hope that it will be usefusul, but | + | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | diff --git a/CRM/Contribute/Form/SoftCredit.php b/CRM/Contribute/Form/SoftCredit.php index dda0cf792f..9950d55084 100644 --- a/CRM/Contribute/Form/SoftCredit.php +++ b/CRM/Contribute/Form/SoftCredit.php @@ -34,7 +34,7 @@ */ /** - * This class build form elements for select exitsing or create new soft block + * This class build form elements for select existing or create new soft block */ class CRM_Contribute_Form_SoftCredit { diff --git a/CRM/Contribute/Import/Field.php b/CRM/Contribute/Import/Field.php index 19df9e74aa..0532540159 100644 --- a/CRM/Contribute/Import/Field.php +++ b/CRM/Contribute/Import/Field.php @@ -113,14 +113,20 @@ class CRM_Contribute_Import_Field { } /** - * The value is in string format. convert the value to the type of this field + * Set a value. + * + * The value is in string format. Convert the value to the type of this field * and set the field value with the appropriate type + * + * @param $value */ public function setValue($value) { $this->_value = $value; } /** + * Validate a field. + * * @return bool */ public function validate() { diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index 09ab819cdf..dd2ca07561 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -34,7 +34,7 @@ */ /** - * class to parse contribution csv files + * Class to parse contribution csv files. */ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Parser { @@ -55,7 +55,12 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa protected $_newContributions; /** - * Class constructor + * Class constructor. + * + * @param $mapperKeys + * @param null $mapperSoftCredit + * @param null $mapperPhoneType + * @param null $mapperSoftCreditType */ public function __construct(&$mapperKeys, $mapperSoftCredit = NULL, $mapperPhoneType = NULL, $mapperSoftCreditType = NULL) { parent::__construct(); @@ -570,7 +575,11 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa } /** - * Process pledge payments + * Process pledge payments. + * + * @param array $formatted + * + * @return int */ public function processPledgePayments(&$formatted) { if (!empty($formatted['pledge_payment_id']) && !empty($formatted['pledge_id'])) { diff --git a/CRM/Contribute/StateMachine/Contribution.php b/CRM/Contribute/StateMachine/Contribution.php index 44b13c6eca..f9c757b031 100644 --- a/CRM/Contribute/StateMachine/Contribution.php +++ b/CRM/Contribute/StateMachine/Contribution.php @@ -42,7 +42,7 @@ class CRM_Contribute_StateMachine_Contribution extends CRM_Core_StateMachine { /** * Class constructor * - * @param CRM_Contact_Import_Controller $controller + * @param CRM_Core_Controller $controller * @param \const|int $action * * @return CRM_Contribute_StateMachine_Contribution -- 2.25.1