Merge pull request #4916 from totten/master-casetypetest-cleanup
[civicrm-core.git] / CRM / Financial / BAO / PaymentProcessor.php
index 2558a784355a60ba53d3a7f9b62090a3f1b5a8e4..eedcf0f643953c90a10a0802626d10b2255f741b 100644 (file)
@@ -101,8 +101,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param array $defaults
    *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Financial_DAO_PaymentProcessor object on success, null otherwise
-   * @static
+   * @return CRM_Financial_DAO_PaymentProcessor|null
+   *   object on success, null otherwise
    */
   public static function retrieve(&$params, &$defaults) {
     $paymentProcessor = new CRM_Financial_DAO_PaymentProcessor();
@@ -122,10 +122,9 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param bool $is_active
    *   Value we want to set the is_active field.
    *
-   * @return Object
-   *   DAO object on sucess, null otherwise
+   * @return CRM_Financial_DAO_PaymentProcessor|null
+   *   DAO object on success, null otherwise
    *
-   * @static
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_PaymentProcessor', $id, 'is_active', $is_active);
@@ -136,10 +135,9 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    *
    * @param NULL
    *
-   * @return object
+   * @return CRM_Financial_DAO_PaymentProcessor|null
    *   The default payment processor object on success,
-   *                          null otherwise
-   * @static
+   *   null otherwise
    */
   public static function &getDefault() {
     if (self::$_defaultPaymentProcessor == NULL) {
@@ -151,12 +149,11 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
   }
 
   /**
-   * Function  to delete payment processor
+   * Delete payment processor
    *
    * @param int $paymentProcessorID
    *
    * @return null
-   * @static
    */
   public static function del($paymentProcessorID) {
     if (!$paymentProcessorID) {
@@ -187,7 +184,6 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    *
    * @return array
    *   associated array with payment processor related fields
-   * @static
    */
   public static function getPayment($paymentProcessorID, $mode) {
     if (!$paymentProcessorID) {
@@ -242,7 +238,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * Compare 2 payment processors to see which should go first based on is_default
    * (sort function for sortDefaultFirst)
    * @param array $processor1
-   * @param array_type $processor2
+   * @param array $processor2
    * @return number
    */
   public static function defaultComparison($processor1, $processor2) {
@@ -264,7 +260,6 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    *
    * @return array
    *   associated array with payment processor related fields
-   * @static
    */
   public static function buildPayment($dao, $mode) {
     $fields = array(
@@ -308,15 +303,15 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @return array
    */
   public static function getAllPaymentProcessors($mode, $reset = FALSE) {
-    /**
+    /*
      * $cacheKey = 'CRM_Financial_BAO_Payment_Processor_' . ($mode ? 'test' : 'all');
      * if (!$reset) {
-     * $processors = CRM_Utils_Cache::singleton()->get($cacheKey);
-     * if (!empty($processors)) {
-     * return $processors;
-     * }
+     *   $processors = CRM_Utils_Cache::singleton()->get($cacheKey);
+     *   if (!empty($processors)) {
+     *     return $processors;
+     *   }
      * }
-     * */
+     */
     $retrievalParameters = array(
       'is_active' => TRUE,
       'options' => array('sort' => 'is_default DESC, name'),
@@ -353,12 +348,11 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * arguably this could go on the pseudoconstant class
    *
    * @param array $capabilities
-   * capabilities of processor e.g
-   *  - BackOffice
-   *  - TestMode
-   *  - LiveMode
-   *  - FutureStartDate
-   *  include test processors (we want to phase this out in favour of the testMode Capability)
+   *   capabilities of processor e.g
+   *   - BackOffice
+   *   - TestMode
+   *   - LiveMode
+   *   - FutureStartDate
    *
    * @param array $ids
    *
@@ -417,9 +411,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param string $type
    *   Type of payment information to be retrieved.
    *
-   * @return int
-   *   / array / object based on type
-   * @static
+   * @return int|array|object
    */
   public static function getProcessorForEntity($entityID, $component = 'contribute', $type = 'id') {
     $result = NULL;