INFRA-132 - Docblock formatting fixes
[civicrm-core.git] / CRM / Core / Payment / Moneris.php
index 5226b9ca46cd08c3962fbec3f0fb86d0f5b8e234..48372a2c5aec6a0175b509470466081cd5df8c01 100644 (file)
@@ -79,31 +79,6 @@ 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) {
-    if (!empty($paymentProcessor['id'])) {
-      $cacheKey = $paymentProcessor['id'];
-    }
-    else {
-      //@todo eliminated instances of this in favour of id-specific instances.
-      $cacheKey = $mode . '_' . $paymentProcessor['name'];
-    }
-    if (self::$_singleton[$cacheKey] === NULL) {
-      self::$_singleton[$cacheKey] = new CRM_Core_Payment_Moneris($mode, $paymentProcessor);
-    }
-    return self::$_singleton[$cacheKey];
-  }
-
   /**
    * This function collects all the information from a web/api form and invokes
    * the relevant payment processor specific functions to perform the transaction
@@ -111,7 +86,8 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment {
    * @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) {
@@ -172,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;
@@ -277,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
@@ -337,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();