From 0b0145091196908841be701edc80ebf2a89a40e4 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Tue, 1 Sep 2015 01:20:46 +1200 Subject: [PATCH] comment fixes --- CRM/Core/I18n/Schema.php | 14 ----------- CRM/Core/Page/Basic.php | 14 +---------- CRM/Core/Payment/GoogleIPN.php | 34 +++++++++++++-------------- CRM/Core/Payment/PayPalProIPN.php | 14 +++++------ CRM/Core/Payment/PayflowPro.php | 7 +----- CRM/Core/QuickForm/Action.php | 4 ---- CRM/Core/QuickForm/Action/Back.php | 4 ---- CRM/Core/QuickForm/Action/Cancel.php | 4 ---- CRM/Core/QuickForm/Action/Display.php | 11 +-------- CRM/Core/QuickForm/Action/Done.php | 4 +--- 10 files changed, 27 insertions(+), 83 deletions(-) diff --git a/CRM/Core/I18n/Schema.php b/CRM/Core/I18n/Schema.php index 658c35aad6..c77f0faf54 100644 --- a/CRM/Core/I18n/Schema.php +++ b/CRM/Core/I18n/Schema.php @@ -29,15 +29,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_I18n_Schema { /** * Drop all views (for use by CRM_Core_DAO::dropAllTables() mostly). - * - * @return void */ public static function dropAllViews() { $domain = new CRM_Core_DAO_Domain(); @@ -62,8 +58,6 @@ class CRM_Core_I18n_Schema { * * @param string $locale * the first locale to create (migrate to). - * - * @return void */ public static function makeMultilingual($locale) { $domain = new CRM_Core_DAO_Domain(); @@ -117,8 +111,6 @@ class CRM_Core_I18n_Schema { * * @param string $retain * the locale to retain. - * - * @return void */ public static function makeSinglelingual($retain) { $domain = new CRM_Core_DAO_Domain(); @@ -163,8 +155,6 @@ class CRM_Core_I18n_Schema { * schema structure class to use to recreate indices. * * @param array $triggers - * - * @return void */ public static function makeSinglelingualTable( $retain, @@ -244,8 +234,6 @@ class CRM_Core_I18n_Schema { * the new locale to add. * @param string $source * the locale to copy from. - * - * @return void */ public static function addLocale($locale, $source) { // get the current supported locales @@ -303,8 +291,6 @@ class CRM_Core_I18n_Schema { * locales to be rebuilt. * @param string $version * version of schema structure to use. - * - * @return void */ public static function rebuildMultilingualSchema($locales, $version = NULL) { if ($version) { diff --git a/CRM/Core/Page/Basic.php b/CRM/Core/Page/Basic.php index 03f20b5728..2560d5fee5 100644 --- a/CRM/Core/Page/Basic.php +++ b/CRM/Core/Page/Basic.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { @@ -112,8 +110,6 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { * * @param CRM_Core_Controller $controller * The controller object. - * - * @return void */ public function addValues($controller) { } @@ -134,12 +130,10 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { /** * Run the basic page (run essentially starts execution for that page). - * - * @return void */ public function run() { // CRM-9034 - // dont see args or pageArgs being used, so we should + // do not see args or pageArgs being used, so we should // consider eliminating them in a future version $n = func_num_args(); $args = ($n > 0) ? func_get_arg(0) : NULL; @@ -190,8 +184,6 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { /** * Browse all entities. - * - * @return void */ public function browse() { $n = func_num_args(); @@ -288,8 +280,6 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { * The permission assigned to this object. * * @param bool $forceAction - * - * @return void */ public function action(&$object, $action, &$values, &$links, $permission, $forceAction = FALSE) { $values['class'] = ''; @@ -370,8 +360,6 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { * * @param bool $imageUpload * @param bool $pushUserContext - * - * @return void */ public function edit($mode, $id = NULL, $imageUpload = FALSE, $pushUserContext = TRUE) { $controller = new CRM_Core_Controller_Simple($this->editForm(), diff --git a/CRM/Core/Payment/GoogleIPN.php b/CRM/Core/Payment/GoogleIPN.php index dffaba07ea..b3832b5b2c 100644 --- a/CRM/Core/Payment/GoogleIPN.php +++ b/CRM/Core/Payment/GoogleIPN.php @@ -16,8 +16,10 @@ * limitations under the License. */ -/* This is the response handler code that will be invoked every time - * a notification or request is sent by the Google Server +/** + * Response handler code. + * + * This will be invoked every time a notification or request is sent by the Google Server. * * To allow this code to receive responses, the url for this file * must be set on the seller page under Settings->Integration as the @@ -28,15 +30,13 @@ * To use this code for merchant-calculated feedback, this url must be * set also as the merchant-calculations-url when the cart is posted * Depending on your calculations for shipping, taxes, coupons and gift - * certificates update parts of the code as required - * + * certificates update parts of the code as required. */ - define('GOOGLE_DEBUG_PP', 0); /** - * Class CRM_Core_Payment_GoogleIPN + * Class CRM_Core_Payment_GoogleIPN. */ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { @@ -107,9 +107,9 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { * @param array $privateData * Contains the name value pair of . * - * @param $component + * @param string $component * - * @return void + * @return bool */ public function newOrderNotify($dataRoot, $privateData, $component) { $ids = $input = $params = array(); @@ -149,7 +149,7 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { if ($ids['contributionRecur']) { if ($objects['contributionRecur']->invoice_id == $dataRoot['serial-number']) { CRM_Core_Error::debug_log_message("The new order notification already handled: {$dataRoot['serial-number']}."); - return; + return FALSE; } else { $transaction = new CRM_Core_Transaction(); @@ -196,8 +196,8 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { $contribution = &$objects['contribution']; if ($contribution->invoice_id != $input['invoice']) { - CRM_Core_Error::debug_log_message("Invoice values dont match between database and IPN request"); - return; + CRM_Core_Error::debug_log_message("Invoice values don't match between database and IPN request"); + return FALSE; } // lets replace invoice-id with google-order-number because thats what is common and unique @@ -208,7 +208,7 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { if ($contribution->total_amount != $input['amount']) { CRM_Core_Error::debug_log_message("Amount values dont match between database and IPN request"); - return; + return FALSE; } if (!$this->getInput($input, $ids, $dataRoot)) { @@ -220,7 +220,7 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { // check if contribution is already completed, if so we ignore this ipn if ($contribution->contribution_status_id == 1) { CRM_Core_Error::debug_log_message("returning since contribution has already been handled"); - return; + return FALSE; } else { /* Since trxn_id hasn't got any use here, @@ -250,9 +250,9 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { * @param array $privateData * Contains the name value pair of . * - * @param $component + * @param string $component * - * @return void + * @return bool */ public function orderStateChange($status, $dataRoot, $privateData, $component) { $input = $objects = $ids = array(); @@ -267,14 +267,14 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { if (!$contribution->find(TRUE)) { CRM_Core_Error::debug_log_message("orderStateChange: Could not find contribution record with invoice id: $serial"); - return; + return FALSE; } // Google sends the charged notification twice. // So to make sure, code is not executed again. if ($contribution->contribution_status_id == 1) { CRM_Core_Error::debug_log_message("Contribution already handled (ContributionID = {$contribution->id})."); - return; + return FALSE; } // make sure invoice is set to serial no for recurring payments, to avoid violating uniqueness diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php index fd6a7f64b6..efde8f24db 100644 --- a/CRM/Core/Payment/PayPalProIPN.php +++ b/CRM/Core/Payment/PayPalProIPN.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { @@ -163,7 +161,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { * @param array $ids * @param array $objects * @param bool $first - * @return void|bool + * @return bool */ public function recur(&$input, &$ids, &$objects, $first) { if (!isset($input['txnType'])) { @@ -232,7 +230,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { && !empty($recur->processor_id) ) { echo "already handled"; - return; + return FALSE; } $recur->create_date = $now; $recur->contribution_status_id = 2; @@ -254,7 +252,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { if ($this->retrieve('profile_status', 'String') == 'Expired') { if (!empty($recur->end_date)) { echo "already handled"; - return; + return FALSE; } $recur->contribution_status_id = 1; $recur->end_date = $now; @@ -289,7 +287,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { } if ($txnType != 'recurring_payment') { - return; + return TRUE; } if (!$first) { @@ -391,14 +389,14 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { * (with the input parameters) & call this & all will be done * * @todo the references to POST throughout this class need to be removed - * @return void|bool + * @return bool */ public function main() { CRM_Core_Error::debug_var('GET', $_GET, TRUE, TRUE); CRM_Core_Error::debug_var('POST', $_POST, TRUE, TRUE); if ($this->_isPaymentExpress) { $this->handlePaymentExpress(); - return NULL; + return FALSE; } $objects = $ids = $input = array(); $this->_component = $input['component'] = self::getValue('m'); diff --git a/CRM/Core/Payment/PayflowPro.php b/CRM/Core/Payment/PayflowPro.php index af5603d443..a28a840ee9 100644 --- a/CRM/Core/Payment/PayflowPro.php +++ b/CRM/Core/Payment/PayflowPro.php @@ -10,7 +10,7 @@ */ /** - * Class CRM_Core_Payment_PayflowPro + * Class CRM_Core_Payment_PayflowPro. */ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment { // (not used, implicit in the API, might need to convert?) @@ -30,11 +30,6 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment { * * @param string $mode * The mode of operation: live or test. - * - * @return void - */ - /** - * @param $mode * @param $paymentProcessor */ public function __construct($mode, &$paymentProcessor) { diff --git a/CRM/Core/QuickForm/Action.php b/CRM/Core/QuickForm/Action.php index 5c4eceada6..7a89506e80 100644 --- a/CRM/Core/QuickForm/Action.php +++ b/CRM/Core/QuickForm/Action.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'HTML/QuickForm/Action.php'; @@ -61,8 +59,6 @@ class CRM_Core_QuickForm_Action extends HTML_QuickForm_Action { /** * Returns the user to the top of the user context stack. - * - * @return void */ public function popUserContext() { $session = CRM_Core_Session::singleton(); diff --git a/CRM/Core/QuickForm/Action/Back.php b/CRM/Core/QuickForm/Action/Back.php index 74a14fc4f6..9efddba2ab 100644 --- a/CRM/Core/QuickForm/Action/Back.php +++ b/CRM/Core/QuickForm/Action/Back.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_QuickForm_Action_Back extends CRM_Core_QuickForm_Action { @@ -54,8 +52,6 @@ class CRM_Core_QuickForm_Action_Back extends CRM_Core_QuickForm_Action { * The current form-page. * @param string $actionName * Current action name, as one Action object can serve multiple actions. - * - * @return void */ public function perform(&$page, $actionName) { $this->_stateMachine->perform($page, $actionName, 'Back'); diff --git a/CRM/Core/QuickForm/Action/Cancel.php b/CRM/Core/QuickForm/Action/Cancel.php index 1b3d27ffc1..5b1729c5fa 100644 --- a/CRM/Core/QuickForm/Action/Cancel.php +++ b/CRM/Core/QuickForm/Action/Cancel.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_QuickForm_Action_Cancel extends CRM_Core_QuickForm_Action { @@ -54,8 +52,6 @@ class CRM_Core_QuickForm_Action_Cancel extends CRM_Core_QuickForm_Action { * CRM_Core_Form the current form-page. * @param string $actionName * Current action name, as one Action object can serve multiple actions. - * - * @return void */ public function perform(&$page, $actionName) { // conditional actions if cancelAction is defined diff --git a/CRM/Core/QuickForm/Action/Display.php b/CRM/Core/QuickForm/Action/Display.php index 4b77758527..3d1fb00782 100644 --- a/CRM/Core/QuickForm/Action/Display.php +++ b/CRM/Core/QuickForm/Action/Display.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action { @@ -67,7 +65,7 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action { * @param string $actionName * Current action name, as one Action object can serve multiple actions. * - * @return void + * @return object|void */ public function perform(&$page, $actionName) { $pageName = $page->getAttribute('id'); @@ -106,9 +104,6 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action { * * @param CRM_Core_Form $page * The CRM_Core_Form page. - * - * - * @return void */ public function renderForm(&$page) { $this->_setRenderTemplates($page); @@ -191,8 +186,6 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action { * * @param CRM_Core_Form $page * The CRM_Core_Form page. - * - * @return void */ public function _setRenderTemplates(&$page) { if (self::$_requiredTemplate === NULL) { @@ -207,8 +200,6 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action { /** * Initialize the various templates. - * - * @return void */ public function initializeTemplates() { if (self::$_requiredTemplate !== NULL) { diff --git a/CRM/Core/QuickForm/Action/Done.php b/CRM/Core/QuickForm/Action/Done.php index 4cba4bb395..f7ce6cc43a 100644 --- a/CRM/Core/QuickForm/Action/Done.php +++ b/CRM/Core/QuickForm/Action/Done.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_QuickForm_Action_Done extends CRM_Core_QuickForm_Action { @@ -58,7 +56,7 @@ class CRM_Core_QuickForm_Action_Done extends CRM_Core_QuickForm_Action { * @param string $actionName * Current action name, as one Action object can serve multiple actions. * - * @return void + * @return object|void */ public function perform(&$page, $actionName) { $page->isFormBuilt() or $page->buildForm(); -- 2.25.1