Skip to content

Commit

Permalink
Merge pull request #12472 from eileenmcnaughton/add_product
Browse files Browse the repository at this point in the history
Remove unused variables & comment cleanup
  • Loading branch information
seamuslee001 authored Jul 14, 2018
2 parents e3556f3 + 5b54155 commit c08d63f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 0 additions & 4 deletions CRM/Contribute/Form/ContributionPage/AddProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,12 @@ public function postProcess() {

$urlParams = 'civicrm/admin/contribute/premium';
if ($this->_action & CRM_Core_Action::PREVIEW) {
$session = CRM_Core_Session::singleton();
$url = CRM_Utils_System::url($urlParams, 'reset=1&action=update&id=' . $this->_id);
$single = $session->get('singleForm');
CRM_Utils_System::redirect($url);
return;
}

if ($this->_action & CRM_Core_Action::DELETE) {
$session = CRM_Core_Session::singleton();
$url = CRM_Utils_System::url($urlParams, 'reset=1&action=update&id=' . $this->_id);
$dao = new CRM_Contribute_DAO_PremiumsProduct();
$dao->id = $this->_pid;
Expand All @@ -246,7 +243,6 @@ public function postProcess() {
CRM_Utils_System::redirect($url);
}
else {
$session = CRM_Core_Session::singleton();
$url = CRM_Utils_System::url($urlParams, 'reset=1&action=update&id=' . $this->_id);
if ($this->_pid) {
$params['id'] = $this->_pid;
Expand Down
8 changes: 4 additions & 4 deletions CRM/Core/BAO/FinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct() {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_FinancialTrxn
* @return CRM_Financial_DAO_FinancialTrxn
*/
public static function create($params) {
$trxn = new CRM_Financial_DAO_FinancialTrxn();
Expand Down Expand Up @@ -116,7 +116,7 @@ public static function getBalanceTrxnAmt($contributionId, $contributionFinancial
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ContributionType
* @return \CRM_Financial_DAO_FinancialTrxn
*/
public static function retrieve(&$params, &$defaults) {
$financialItem = new CRM_Financial_DAO_FinancialTrxn();
Expand Down Expand Up @@ -507,7 +507,7 @@ public static function getPartialPaymentWithType($entityId, $entityName = 'parti
/**
* @param int $contributionId
*
* @return array
* @return string
*/
public static function getTotalPayments($contributionId) {
$statusId = CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Completed');
Expand All @@ -531,7 +531,7 @@ public static function getTotalPayments($contributionId) {
* @param array $contribution
* @param array $params
*
* @return CRM_Core_BAO_FinancialTrxn
* @return \CRM_Financial_DAO_FinancialTrxn
*/
public static function getPartialPaymentTrxn($contribution, $params) {
$trxn = CRM_Contribute_BAO_Contribution::recordPartialPayment($contribution, $params);
Expand Down
10 changes: 5 additions & 5 deletions CRM/Financial/BAO/FinancialItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct() {
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Financial_BAO_FinancialItem
* @return CRM_Financial_DAO_FinancialItem
*/
public static function retrieve(&$params, &$defaults) {
$financialItem = new CRM_Financial_DAO_FinancialItem();
Expand Down Expand Up @@ -189,9 +189,9 @@ public static function create(&$params, $ids = NULL, $trxnIds = NULL) {
* Takes an associative array and creates a entity financial transaction object.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
* an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_FinancialTrxn
* @return CRM_Financial_DAO_EntityFinancialTrxn
*/
public static function createEntityTrxn($params) {
$entity_trxn = new CRM_Financial_DAO_EntityFinancialTrxn();
Expand All @@ -204,9 +204,9 @@ public static function createEntityTrxn($params) {
* Retrive entity financial trxn details.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
* an assoc array of name/value pairs.
* @param bool $maxId
* To retrive max id.
* To retrieve max id.
*
* @return array
*/
Expand Down

0 comments on commit c08d63f

Please sign in to comment.