INFRA-132 - Docblock formatting fixes
[civicrm-core.git] / CRM / Core / Payment / Moneris.php
index 2d2ec2f78665352bc2f9053b4faf16606e19f113..48372a2c5aec6a0175b509470466081cd5df8c01 100644 (file)
@@ -49,7 +49,8 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
   /**
    * Constructor
    *
-   * @param string $mode the mode of operation: live or test
+   * @param string $mode
+   *   The mode of operation: live or test.
    *
    * @param $paymentProcessor
    *
@@ -78,31 +79,15 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
     }
   }
 
-  /**
-   * Singleton function used to manage this object
-   *
-   * @param string $mode the mode of operation: live or test
-   *
-   * @param object $paymentProcessor
-   *
-   * @return object
-   * @static
-   */
-  public static function &singleton($mode, &$paymentProcessor) {
-    $processorName = $paymentProcessor['name'];
-    if (self::$_singleton[$processorName] === NULL) {
-      self::$_singleton[$processorName] = new CRM_Core_Payment_Moneris($mode, $paymentProcessor);
-    }
-    return self::$_singleton[$processorName];
-  }
-
   /**
    * This function collects all the information from a web/api form and invokes
    * the relevant payment processor specific functions to perform the transaction
    *
-   * @param  array $params assoc array of input parameters for this transaction
+   * @param array $params
+   *   Assoc array of input parameters for this transaction.
    *
-   * @return array the result in an nice formatted array (or an error object)
+   * @return array
+   *   the result in an nice formatted array (or an error object)
    * @abstract
    */
   public function doDirectPayment(&$params) {
@@ -163,10 +148,10 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
     // add a recurring payment if requested
     if ($params['is_recur'] && $params['installments'] > 1) {
       //Recur Variables
-      $recurUnit     = $params['frequency_unit'];
+      $recurUnit = $params['frequency_unit'];
       $recurInterval = $params['frequency_interval'];
-      $next          = time();
-      $day           = 60 * 60 * 24;
+      $next = time();
+      $day = 60 * 60 * 24;
       switch ($recurUnit) {
         case 'day':
           $next += $recurInterval * $day;
@@ -268,8 +253,8 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
     return TRUE;
   }
 
-  // ignore for now, more elaborate error handling later.
   /**
+   * ignore for now, more elaborate error handling later.
    * @param $response
    *
    * @return object
@@ -328,7 +313,8 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
   /**
    * This function checks to see if we have the right config values
    *
-   * @return string the error message if any
+   * @return string
+   *   the error message if any
    */
   public function checkConfig() {
     $error = array();