Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-02-18-36-16
[civicrm-core.git] / CRM / Core / Payment / BaseIPN.php
index aaa911a2fb8c249f72c882a37701058ffcff6257..f461bf693b3f130c2a03486eb61c80b4a45f999e 100644 (file)
@@ -86,7 +86,7 @@ class CRM_Core_Payment_BaseIPN {
    *   Boolean Return FALSE if the relevant objects don't exist.
    * @param int $paymentProcessorID
    *   Id of the payment processor ID in use.
-   * @return boolean
+   * @return bool
    */
   public function validateData(&$input, &$ids, &$objects, $required = TRUE, $paymentProcessorID = NULL) {
 
@@ -135,7 +135,7 @@ class CRM_Core_Payment_BaseIPN {
    * @param int $paymentProcessorID
    * @param array $error_handling
    *
-   * @return boolean
+   * @return bool
    */
   public function loadObjects(&$input, &$ids, &$objects, $required, $paymentProcessorID, $error_handling = NULL) {
     if (empty($error_handling)) {
@@ -167,7 +167,7 @@ class CRM_Core_Payment_BaseIPN {
         CRM_Core_Error::debug_log_message($e->getMessage());
       }
       if (!empty($error_handling['echo_error'])) {
-        echo($e->getMessage());
+        echo $e->getMessage();
       }
       if (!empty($error_handling['return_error'])) {
         return array(
@@ -185,7 +185,7 @@ class CRM_Core_Payment_BaseIPN {
    * @param array $objects
    * @param object $transaction
    * @param array $input
-   * @return boolean
+   * @return bool
    */
   public function failed(&$objects, &$transaction, $input = array()) {
     $contribution = &$objects['contribution'];
@@ -265,7 +265,7 @@ class CRM_Core_Payment_BaseIPN {
    * Handled pending contribution status
    * @param array $objects
    * @param object $transaction
-   * @return boolean
+   * @return bool
    */
   public function pending(&$objects, &$transaction) {
     $transaction->commit();
@@ -792,7 +792,7 @@ LIMIT 1;";
    * it is unclear whether it is a function on the way in or on the way out
    *
    * @param array $params
-   * @return void|int
+   * @return void|NULL|int
    */
   public function updateContributionStatus(&$params) {
     // get minimum required values.
@@ -802,7 +802,7 @@ LIMIT 1;";
     $contributionId = CRM_Utils_Array::value('contribution_id', $params);
 
     if (!$contributionId || !$componentId || !$componentName || !$statusId) {
-      return;
+      return NULL;
     }
 
     $input = $ids = $objects = array();