From bf48aa2987fac37fa787d675af78f106d00fc09a Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 10 Jan 2017 14:36:00 +1300 Subject: [PATCH] Further comment fixes --- CRM/Admin/Form/Setting/Component.php | 3 +- CRM/Batch/Form/Entry.php | 4 ++- CRM/Contact/Form/Task/Label.php | 2 ++ CRM/Core/CodeGen/Schema.php | 4 +++ CRM/Core/DAO.php | 17 ++++++--- CRM/Core/Error.php | 5 +++ CRM/Core/OptionGroup.php | 4 +-- CRM/Core/PseudoConstant.php | 2 +- CRM/Event/Cart/Form/Checkout/Payment.php | 44 +++++++++++++++++++----- CRM/Financial/Form/Payment.php | 2 ++ CRM/Pledge/BAO/Pledge.php | 3 ++ CRM/SMS/BAO/Provider.php | 2 -- CRM/Utils/Address/USPS.php | 8 +++-- CRM/Utils/Check/Message.php | 2 +- CRM/Utils/Type.php | 2 +- 15 files changed, 79 insertions(+), 25 deletions(-) diff --git a/CRM/Admin/Form/Setting/Component.php b/CRM/Admin/Form/Setting/Component.php index b07a227016..4a45be0e23 100644 --- a/CRM/Admin/Form/Setting/Component.php +++ b/CRM/Admin/Form/Setting/Component.php @@ -115,7 +115,8 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting { } /** - * @param $dsn + * Load case sample data. + * * @param string $fileName * @param bool $lineMode */ diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 62ebf604d7..dd61256132 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -109,7 +109,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { } /** - * Used in test to set Batch ID + * Set Batch ID. + * + * @param int $id */ public function setBatchID($id) { $this->_batchId = $id; diff --git a/CRM/Contact/Form/Task/Label.php b/CRM/Contact/Form/Task/Label.php index c26c4c80bd..24e1dce7fe 100644 --- a/CRM/Contact/Form/Task/Label.php +++ b/CRM/Contact/Form/Task/Label.php @@ -53,6 +53,8 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task { /** * Common Function to build Mailing Label Form. + * + * @param CRM_Core_Form $form */ public static function buildLabelForm($form) { CRM_Utils_System::setTitle(ts('Make Mailing Labels')); diff --git a/CRM/Core/CodeGen/Schema.php b/CRM/Core/CodeGen/Schema.php index 51db8af5e8..48247fd427 100644 --- a/CRM/Core/CodeGen/Schema.php +++ b/CRM/Core/CodeGen/Schema.php @@ -4,7 +4,11 @@ * Create SQL files to create and populate a new schema. */ class CRM_Core_CodeGen_Schema extends CRM_Core_CodeGen_BaseTask { + /** + * CRM_Core_CodeGen_Schema constructor. + * + * @param \CRM_Core_CodeGen_Main $config */ public function __construct($config) { parent::__construct($config); diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 11993e0c16..2c4d8992b7 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1197,14 +1197,21 @@ FROM civicrm_domain } /** - * execute an unbuffered query. This is a wrapper around new functionality - * exposed with CRM-17748. + * Execute an unbuffered query. + * + * This is a wrapper around new functionality exposed with CRM-17748. * * @param string $query query to be executed * - * @return Object CRM_Core_DAO object that points to an unbuffered result set - * @static - * @access public + * @param array $params + * @param bool $abort + * @param null $daoName + * @param bool $freeDAO + * @param bool $i18nRewrite + * @param bool $trapException + * + * @return CRM_Core_DAO + * Object that points to an unbuffered result set */ static public function executeUnbufferedQuery( $query, diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 79efb1302f..07dfc50b87 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -650,7 +650,12 @@ class CRM_Core_Error extends PEAR_ErrorStack { /** * Generate a hash for the logfile. + * * CRM-13640. + * + * @param CRM_Core_Config $config + * + * @return string */ public static function generateLogFileHash($config) { // Use multiple (but stable) inputs for hash information. diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index f947da01db..8fdecdfdb5 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -108,10 +108,10 @@ class CRM_Core_OptionGroup { * ignore cache entries and go back to DB. * @param string $keyColumnName * the column to use for 'key'. + * @param string $orderBy * * @return array - * the values as specified by the above params - * @void + * The values as specified by the params */ public static function &values( $name, $flip = FALSE, $grouping = FALSE, diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index ec3a5546a8..c6d0ca00ec 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -1003,7 +1003,7 @@ WHERE id = %1"; * Db column name/label. * @param bool $reset * Reset relationship types if true. - * @param bool|NULL $isActive + * @param bool $isActive * Filter by is_active. NULL to disable. * * @return array diff --git a/CRM/Event/Cart/Form/Checkout/Payment.php b/CRM/Event/Cart/Form/Checkout/Payment.php index 9bf8430f16..cdef3ae592 100644 --- a/CRM/Event/Cart/Form/Checkout/Payment.php +++ b/CRM/Event/Cart/Form/Checkout/Payment.php @@ -329,6 +329,8 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** + * Get default from address. + * * @return mixed */ public function getDefaultFrom() { @@ -337,7 +339,9 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** - * @param $events_in_cart + * Send email receipt. + * + * @param array $events_in_cart * @param array $params */ public function emailReceipt($events_in_cart, $params) { @@ -406,9 +410,11 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** - * @param $fields - * @param $files - * @param $self + * Apply form rules. + * + * @param array $fields + * @param array $files + * @param CRM_Core_Form $self * * @return array|bool */ @@ -426,6 +432,8 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** + * Validate form. + * * @todo this should surely go! Test & remove. * @return bool */ @@ -439,6 +447,9 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { return parent::validate(); } + /** + * Pre-process form. + */ public function preProcess() { $params = $this->_submitValues; $this->is_pay_later = CRM_Utils_Array::value('is_pay_later', $params, FALSE) && !CRM_Utils_Array::value('payment_completed', $params); @@ -446,6 +457,9 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { parent::preProcess(); } + /** + * Post process form. + */ public function postProcess() { $transaction = new CRM_Core_Transaction(); @@ -580,9 +594,11 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** + * Make payment. + * * @param array $params * - * @return array|void + * @return array * @throws Exception */ public function make_payment(&$params) { @@ -618,9 +634,11 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** - * @param $mer_participant + * Record contribution. + * + * @param CRM_Event_BAO_Participant $mer_participant * @param array $params - * @param $event + * @param CRM_Event_BAO_Event $event * * @return object * @throws Exception @@ -672,6 +690,9 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { return $contribution; } + /** + * Save data to session. + */ public function saveDataToSession() { $session_line_items = array(); foreach ($this->line_items as $line_item) { @@ -691,6 +712,8 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** + * Set form default values. + * * @return array */ public function setDefaultValues() { @@ -741,9 +764,14 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { } /** + * Apply discount. + * * @param string $discountCode * @param array $price_set_amount - * @param $cost + * @param float $cost + * @param int $event_id + * + * @return bool */ protected function apply_discount($discountCode, &$price_set_amount, &$cost, $event_id) { //need better way to determine if cividiscount installed diff --git a/CRM/Financial/Form/Payment.php b/CRM/Financial/Form/Payment.php index f7c047c8a0..dbb50070eb 100644 --- a/CRM/Financial/Form/Payment.php +++ b/CRM/Financial/Form/Payment.php @@ -96,6 +96,8 @@ class CRM_Financial_Form_Payment extends CRM_Core_Form { /** * Add JS to show icons for the accepted credit cards. + * + * @param int $paymentProcessorID */ public static function addCreditCardJs($paymentProcessorID = NULL) { $creditCards = array(); diff --git a/CRM/Pledge/BAO/Pledge.php b/CRM/Pledge/BAO/Pledge.php index 7e7327e78d..10c502e2a6 100644 --- a/CRM/Pledge/BAO/Pledge.php +++ b/CRM/Pledge/BAO/Pledge.php @@ -1236,6 +1236,9 @@ SELECT pledge.contact_id as contact_id, /** * Get first payment date for pledge. * + * @param int $day + * + * @return bool|string */ public static function getPaymentDate($day) { if ($day == 31) { diff --git a/CRM/SMS/BAO/Provider.php b/CRM/SMS/BAO/Provider.php index 1ae2cb6053..ffae6a7867 100644 --- a/CRM/SMS/BAO/Provider.php +++ b/CRM/SMS/BAO/Provider.php @@ -34,8 +34,6 @@ class CRM_SMS_BAO_Provider extends CRM_SMS_DAO_Provider { /** * Class constructor. - * - * @return \CRM_SMS_DAO_Provider */ public function __construct() { parent::__construct(); diff --git a/CRM/Utils/Address/USPS.php b/CRM/Utils/Address/USPS.php index 29bd5bf4af..5cedcc7e08 100644 --- a/CRM/Utils/Address/USPS.php +++ b/CRM/Utils/Address/USPS.php @@ -43,16 +43,18 @@ class CRM_Utils_Address_USPS { protected static $_disabled = FALSE; /** - * @param $disabled + * Disable the USPS validation. * - * @return void + * @param bool $disable */ public static function disable($disable = TRUE) { self::$_disabled = $disable; } /** - * @param $values + * Check address against USPS. + * + * @param array $values * * @return bool */ diff --git a/CRM/Utils/Check/Message.php b/CRM/Utils/Check/Message.php index eac42a0ad3..43c04e5a33 100644 --- a/CRM/Utils/Check/Message.php +++ b/CRM/Utils/Check/Message.php @@ -87,10 +87,10 @@ class CRM_Utils_Check_Message { * Printable message (short). * @param string $level * The severity of the message. Use PSR-3 log levels. + * @param string $icon * * @see Psr\Log\LogLevel * - * @throws \CRM_Core_Exception */ public function __construct($name, $message, $title, $level = \Psr\Log\LogLevel::WARNING, $icon = NULL) { $this->name = $name; diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php index 6a2bf76206..c782e5cec5 100644 --- a/CRM/Utils/Type.php +++ b/CRM/Utils/Type.php @@ -144,7 +144,7 @@ class CRM_Utils_Type { } /** - * Helper function to call escape on arrays + * Helper function to call escape on arrays. * * @see escape */ -- 2.25.1