Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-02-18-36-16
[civicrm-core.git] / CRM / Upgrade / Snapshot / V4p2 / Price / BAO / LineItem.php
index 5c6b5808493e576c11d5b26267489c596a1449a7..c78dfd152d1077a417f0565c29746a88585beea5 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -51,8 +51,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem extends CRM_Upgrade_Snapshot_
    * @param array $params
    *   (reference) an assoc array of name/value pairs.
    *
-   * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem object
-   * @static
+   * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem
    */
   public static function create(&$params) {
     //create mode only as we don't support editing line items
@@ -80,8 +79,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem extends CRM_Upgrade_Snapshot_
    * @param array $defaults
    *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem object
-   * @static
+   * @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem
    */
   public static function retrieve(&$params, &$defaults) {
     $lineItem = new CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem();
@@ -97,14 +95,15 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem extends CRM_Upgrade_Snapshot_
    * Given a participant id/contribution id,
    * return contribution/fee line items
    *
-   * @param $entityId
-   *   Int participant/contribution id.
-   * @param $entity
-   *   String participant/contribution.
+   * @param int $entityId
+   *   participant/contribution id.
+   * @param string $entity
+   *   participant/contribution.
    *
    * @param null $isQuick
    *
-   * @return array of line items
+   * @return array
+   *   Array of line items
    */
   public static function getLineItems($entityId, $entity = 'participant', $isQuick = NULL) {
     $selectClause = $whereClause = $fromClause = NULL;
@@ -182,7 +181,7 @@ WHERE     %2.id = %1";
    *                          to the price set used for particular event
    * @param array $values
    *   Reference to the values array(.
-  this is
+   *   this is
    *                          lineItem array)
    *
    * @return void
@@ -242,7 +241,6 @@ WHERE     %2.id = %1";
    * @param int $entityTable
    *
    * @return bool
-   * @static
    */
   public static function deleteLineItems($entityId, $entityTable) {
     $result = FALSE;
@@ -290,7 +288,8 @@ LEFT JOIN   civicrm_price_set ps ON ps.id = pf.price_set_id ";
       $entityName = 'default_contribution_amount';
       $where .= " AND ps.name = %4 ";
       $params[4] = array($entityName, 'String');
-    } elseif ($entityTable == 'civicrm_participant') {
+    }
+    elseif ($entityTable == 'civicrm_participant') {
       $from .= "
 LEFT JOIN civicrm_price_set_entity cpse ON cpse.price_set_id = ps.id
 LEFT JOIN civicrm_price_field_value cpfv ON cpfv.price_field_id = pf.id and cpfv.label = %4 ";
@@ -312,4 +311,5 @@ WHERE  $where
 
     CRM_Core_DAO::executeQuery($query, $params);
   }
+
 }