From cded2ebf3c66eea248c5fa615557aabaf693e2eb Mon Sep 17 00:00:00 2001 From: Saurabh Batra Date: Tue, 20 Oct 2015 23:28:07 +0530 Subject: [PATCH] Comment fixes and function clean-up for CRM/Financial directory. --- CRM/Financial/BAO/ExportFormat.php | 18 ++++------------ CRM/Financial/BAO/ExportFormat/CSV.php | 24 ++++++--------------- CRM/Financial/BAO/ExportFormat/IIF.php | 16 ++++++++------ CRM/Financial/BAO/FinancialAccount.php | 6 ++---- CRM/Financial/BAO/FinancialItem.php | 4 +--- CRM/Financial/BAO/FinancialType.php | 6 ++---- CRM/Financial/BAO/FinancialTypeAccount.php | 8 +++---- CRM/Financial/BAO/PaymentProcessor.php | 4 ++-- CRM/Financial/BAO/PaymentProcessorType.php | 4 +--- CRM/Financial/Form/BatchTransaction.php | 5 ----- CRM/Financial/Form/Export.php | 12 ++--------- CRM/Financial/Form/FinancialAccount.php | 14 +----------- CRM/Financial/Form/FinancialBatch.php | 18 +++------------- CRM/Financial/Form/FinancialType.php | 7 ------ CRM/Financial/Form/FinancialTypeAccount.php | 13 ++--------- CRM/Financial/Form/Search.php | 6 ++++-- CRM/Financial/Page/AJAX.php | 16 ++++++-------- CRM/Financial/Page/Batch.php | 11 ---------- CRM/Financial/Page/BatchTransaction.php | 13 ----------- CRM/Financial/Page/FinancialAccount.php | 7 ------ CRM/Financial/Page/FinancialBatch.php | 4 ---- CRM/Financial/Page/FinancialType.php | 8 ------- CRM/Financial/Page/FinancialTypeAccount.php | 10 +-------- 23 files changed, 52 insertions(+), 182 deletions(-) diff --git a/CRM/Financial/BAO/ExportFormat.php b/CRM/Financial/BAO/ExportFormat.php index f676f48e93..5b89b27502 100644 --- a/CRM/Financial/BAO/ExportFormat.php +++ b/CRM/Financial/BAO/ExportFormat.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -104,14 +102,6 @@ class CRM_Financial_BAO_ExportFormat { return 'txt'; } - /** - * Override this if appropriate. - * @return null - */ - public function getTemplateFileName() { - return NULL; - } - /** * @return object */ @@ -150,7 +140,7 @@ class CRM_Financial_BAO_ExportFormat { public function initiateDownload() { $config = CRM_Core_Config::singleton(); - //zip files if more than one. + // zip files if more than one. if (count($this->_downloadFile) > 1) { $zip = $config->customFileUploadDir . 'Financial_Transactions_' . date('YmdHis') . '.zip'; $result = $this->createZip($this->_downloadFile, $zip, TRUE); @@ -204,7 +194,7 @@ class CRM_Financial_BAO_ExportFormat { $subject .= ' ' . ts('Count') . '[' . $values['item_count'] . '],'; } - //create activity. + // create activity. $subject .= ' ' . ts('Batch') . '[' . $values['title'] . ']'; $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); $activityParams = array( @@ -235,14 +225,14 @@ class CRM_Financial_BAO_ExportFormat { * @return bool */ public function createZip($files = array(), $destination = NULL, $overwrite = FALSE) { - //if the zip file already exists and overwrite is false, return false + // if the zip file already exists and overwrite is false, return false if (file_exists($destination) && !$overwrite) { return FALSE; } $valid_files = array(); if (is_array($files)) { foreach ($files as $file) { - //make sure the file exists + // make sure the file exists if (file_exists($file)) { $validFiles[] = $file; } diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 565b9c13f1..841e453018 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -38,8 +36,12 @@ */ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat { - // For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere. - // Possibly in the future this could be selected by the user. + /** + * For this phase, we always output these records too so that there isn't data + * referenced in the journal entries that isn't defined anywhere. + * + * Possibly in the future this could be selected by the user. + */ public static $complementaryTables = array( 'ACCNT', 'CUST', @@ -58,7 +60,7 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat public function export($exportParams) { $export = parent::export($exportParams); - // Save the file in the public directory + // Save the file in the public directory. $fileName = self::putFile($export); foreach (self::$complementaryTables as $rct) { @@ -66,9 +68,6 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat $this->$func(); } - // now do general journal entries - $this->exportTRANS(); - $this->output($fileName); } @@ -243,13 +242,4 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat return 'csv'; } - public function exportACCNT() { - } - - public function exportCUST() { - } - - public function exportTRANS() { - } - } diff --git a/CRM/Financial/BAO/ExportFormat/IIF.php b/CRM/Financial/BAO/ExportFormat/IIF.php index 4f7c37d4ba..46b6c9b980 100644 --- a/CRM/Financial/BAO/ExportFormat/IIF.php +++ b/CRM/Financial/BAO/ExportFormat/IIF.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -38,12 +36,18 @@ */ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat { - // Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs. - // Can't set it here using chr() because static. Same thing if a const. So it's set in constructor. + /** + * Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs. + * Can't set it here using chr() because static. Same thing if a const. So it's set in constructor. + */ static $SEPARATOR; - // For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere. - // Possibly in the future this could be selected by the user. + /** + * For this phase, we always output these records too so that there isn't data + * referenced in the journal entries that isn't defined anywhere. + * + * Possibly in the future this could be selected by the user. + */ public static $complementaryTables = array( 'ACCNT', 'CUST', diff --git a/CRM/Financial/BAO/FinancialAccount.php b/CRM/Financial/BAO/FinancialAccount.php index 60c82b68a0..9d866799ca 100644 --- a/CRM/Financial/BAO/FinancialAccount.php +++ b/CRM/Financial/BAO/FinancialAccount.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAccount { @@ -121,7 +119,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco * @param int $financialAccountId */ public static function del($financialAccountId) { - //checking if financial type is present + // checking if financial type is present $check = FALSE; //check dependencies @@ -144,7 +142,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount', "reset=1&action=browse")); } - //delete from financial Type table + // delete from financial Type table $financialAccount = new CRM_Financial_DAO_FinancialAccount(); $financialAccount->id = $financialAccountId; $financialAccount->delete(); diff --git a/CRM/Financial/BAO/FinancialItem.php b/CRM/Financial/BAO/FinancialItem.php index 059533dfc8..daed659329 100644 --- a/CRM/Financial/BAO/FinancialItem.php +++ b/CRM/Financial/BAO/FinancialItem.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_BAO_FinancialItem extends CRM_Financial_DAO_FinancialItem { @@ -209,7 +207,7 @@ class CRM_Financial_BAO_FinancialItem extends CRM_Financial_DAO_FinancialItem { public static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) { $financialItem = new CRM_Financial_DAO_EntityFinancialTrxn(); $financialItem->copyValues($params); - //retrieve last entry from civicrm_entity_financial_trxn + // retrieve last entry from civicrm_entity_financial_trxn if ($maxId) { $financialItem->orderBy('id DESC'); $financialItem->limit(1); diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 9cd40e947e..47492863dd 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { @@ -144,7 +142,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { // tables to ingore checks for financial_type_id $ignoreTables = array('CRM_Financial_DAO_EntityFinancialAccount'); - //TODO: if (!$financialType->find(true)) { + // TODO: if (!$financialType->find(true)) { // ensure that we have no objects that have an FK to this financial type id TODO: that cannot be null $occurrences = $financialType->findReferences(); @@ -166,7 +164,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { } } - //delete from financial Type table + // delete from financial Type table $financialType->delete(); $entityFinancialType = new CRM_Financial_DAO_EntityFinancialAccount(); diff --git a/CRM/Financial/BAO/FinancialTypeAccount.php b/CRM/Financial/BAO/FinancialTypeAccount.php index 5b2a182676..3775d16d80 100644 --- a/CRM/Financial/BAO/FinancialTypeAccount.php +++ b/CRM/Financial/BAO/FinancialTypeAccount.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFinancialAccount { @@ -107,12 +105,12 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin * */ public static function del($financialTypeAccountId, $accountId = NULL) { - //checking if financial type is present + // check if financial type is present $check = FALSE; $relationValues = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship'); $financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $financialTypeAccountId, 'entity_id'); - //check dependencies + // check dependencies // FIXME more table containing financial_type_id to come $dependency = array( array('Contribute', 'Contribution'), @@ -146,7 +144,7 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', "reset=1&action=browse&aid={$accountId}")); } - //delete from financial Type table + // delete from financial Type table $financialType = new CRM_Financial_DAO_EntityFinancialAccount(); $financialType->id = $financialTypeAccountId; $financialType->find(TRUE); diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index 382bf8a096..1231434a4b 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -433,7 +433,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces ) { return $result; } - //FIXME: + if ($component == 'membership') { $sql = " SELECT cr.payment_processor_id as ppID1, cp.payment_processor as ppID2, con.is_test @@ -459,7 +459,7 @@ INNER JOIN civicrm_contribution con ON ( mp.contribution_id = con.id ) WHERE cr.id = %1"; } - //we are interesting in single record. + // We are interested in a single record. $sql .= ' LIMIT 1'; $params = array(1 => array($entityID, 'Integer')); diff --git a/CRM/Financial/BAO/PaymentProcessorType.php b/CRM/Financial/BAO/PaymentProcessorType.php index 941b646c51..b6f548f5f8 100644 --- a/CRM/Financial/BAO/PaymentProcessorType.php +++ b/CRM/Financial/BAO/PaymentProcessorType.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentProcessorType { @@ -54,7 +52,7 @@ class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentPr * @param array $defaults * (reference ) an assoc array to hold the flattened values. * - * @return CRM_Core_BAO_LocaationType|null + * @return CRM_Core_BAO_LocationType|null * object on success, null otherwise */ public static function retrieve(&$params, &$defaults) { diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index 8c11d16fdb..5c6da49a60 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * This class generates form components for Financial Type - * */ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form { static $_links = NULL; @@ -77,8 +74,6 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { if ($this->_batchStatusId == 2) { diff --git a/CRM/Financial/Form/Export.php b/CRM/Financial/Form/Export.php index 89c916eda2..507eb7af03 100644 --- a/CRM/Financial/Form/Export.php +++ b/CRM/Financial/Form/Export.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -64,8 +62,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { /** * Build all the data structures needed to build the form. - * - * @return void */ public function preProcess() { $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); @@ -73,7 +69,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { // this mean it's a batch action if (!$this->_id) { if (!empty($_GET['batch_id'])) { - //validate batch ids + // validate batch ids $batchIds = explode(',', $_GET['batch_id']); foreach ($batchIds as $batchId) { CRM_Utils_Type::validate($batchId, 'Positive'); @@ -96,7 +92,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { $allBatchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id'); $this->_exportStatusId = CRM_Utils_Array::key('Exported', $allBatchStatus); - //check if batch status is valid, do not allow exported batches to export again + // check if batch status is valid, do not allow exported batches to export again $batchStatus = CRM_Batch_BAO_Batch::getBatchStatuses($this->_batchIds); foreach ($batchStatus as $batchStatusId) { @@ -112,8 +108,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { // this mean it's a batch action @@ -151,8 +145,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { /** * Process the form after the input has been submitted and validated. - * - * @return void */ public function postProcess() { if (!$this->_exportFormat) { diff --git a/CRM/Financial/Form/FinancialAccount.php b/CRM/Financial/Form/FinancialAccount.php index 73efb5e386..4fa43aa970 100644 --- a/CRM/Financial/Form/FinancialAccount.php +++ b/CRM/Financial/Form/FinancialAccount.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * This class generates form components for Financial Account - * */ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { @@ -49,8 +46,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { parent::preProcess(); @@ -76,8 +71,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { parent::buildQuickForm(); @@ -175,10 +168,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { /** * Set default values for the form. - * the default values are retrieved from the database - * - * - * @return void + * the default values are retrieved from the database. */ public function setDefaultValues() { $defaults = parent::setDefaultValues(); @@ -190,8 +180,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { /** * Process the form submission. - * - * @return void */ public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { diff --git a/CRM/Financial/Form/FinancialBatch.php b/CRM/Financial/Form/FinancialBatch.php index 1045266c7f..cadef1f9c3 100644 --- a/CRM/Financial/Form/FinancialBatch.php +++ b/CRM/Financial/Form/FinancialBatch.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * This class generates form components for Accounting Batch - * */ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { @@ -48,8 +45,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { $context = CRM_Utils_Request::retrieve('context', 'String', $this); @@ -84,8 +79,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { parent::buildQuickForm(); @@ -124,7 +117,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { if ($this->_action & CRM_Core_Action::UPDATE && $this->_id) { $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id'); - //unset exported status + // unset exported status $exportedStatusId = CRM_Utils_Array::key('Exported', $batchStatus); unset($batchStatus[$exportedStatusId]); $this->add('select', 'status_id', ts('Batch Status'), array('' => ts('- select -')) + $batchStatus, TRUE); @@ -150,10 +143,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { /** * Set default values for the form. Note that in edit/view mode - * the default values are retrieved from the database - * - * - * @return void + * the default values are retrieved from the database. */ public function setDefaultValues() { $defaults = parent::setDefaultValues(); @@ -203,8 +193,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { /** * Process the form submission. - * - * @return void */ public function postProcess() { $session = CRM_Core_Session::singleton(); @@ -244,7 +232,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); - //create activity. + // create activity. $activityParams = array( 'activity_type_id' => array_search($activityTypeName, $activityTypes), 'subject' => $batch->title . "- Batch", diff --git a/CRM/Financial/Form/FinancialType.php b/CRM/Financial/Form/FinancialType.php index a746a5debd..424e7ff19a 100644 --- a/CRM/Financial/Form/FinancialType.php +++ b/CRM/Financial/Form/FinancialType.php @@ -29,20 +29,15 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * This class generates form components for Financial Type - * */ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { parent::buildQuickForm(); @@ -77,8 +72,6 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form { /** * Process the form submission. - * - * @return void */ public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { diff --git a/CRM/Financial/Form/FinancialTypeAccount.php b/CRM/Financial/Form/FinancialTypeAccount.php index 68b787a0a7..c9c9a2a0d9 100644 --- a/CRM/Financial/Form/FinancialTypeAccount.php +++ b/CRM/Financial/Form/FinancialTypeAccount.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * This class generates form components for Financial Type Account - * */ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { @@ -69,8 +66,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { $this->_aid = CRM_Utils_Request::retrieve('aid', 'Positive', $this); @@ -120,8 +115,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { parent::buildQuickForm(); @@ -142,10 +135,10 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { if ($this->_action == CRM_Core_Action::UPDATE) { $this->assign('aid', $this->_id); - //hidden field to catch the group id in profile + // hidden field to catch the group id in profile $this->add('hidden', 'financial_type_id', $this->_aid); - //hidden field to catch the field id in profile + // hidden field to catch the field id in profile $this->add('hidden', 'account_type_id', $this->_id); } $AccountTypeRelationship = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship'); @@ -302,8 +295,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { /** * Process the form submission. - * - * @return void */ public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { diff --git a/CRM/Financial/Form/Search.php b/CRM/Financial/Form/Search.php index 8a62d0d787..58951b3f4a 100644 --- a/CRM/Financial/Form/Search.php +++ b/CRM/Financial/Form/Search.php @@ -29,8 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * + */ + +/** + * @todo Add comments if possible. */ class CRM_Financial_Form_Search extends CRM_Core_Form { diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index c03fd36a99..b2a632164b 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -56,14 +54,14 @@ class CRM_Financial_Page_AJAX { } else { $financialAccountType = array( - '5' => 5, //expense - '3' => 1, //AR relation - '1' => 3, //revenue + '5' => 5, // expense + '3' => 1, // AR relation + '1' => 3, // revenue '6' => 1, // asset - '7' => 4, //cost of sales - '8' => 1, //premium inventory - '9' => 3, //discount account is - '10' => 2, //sales tax liability + '7' => 4, // cost of sales + '8' => 1, // premium inventory + '9' => 3, // discount account is + '10' => 2, // sales tax liability ); $financialAccountType = CRM_Utils_Array::value($_GET['_value'], $financialAccountType); $result = CRM_Contribute_PseudoConstant::financialAccount(NULL, $financialAccountType); diff --git a/CRM/Financial/Page/Batch.php b/CRM/Financial/Page/Batch.php index 4763e1dbcb..9e8d8eeaf8 100644 --- a/CRM/Financial/Page/Batch.php +++ b/CRM/Financial/Page/Batch.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -55,13 +53,6 @@ class CRM_Financial_Page_Batch extends CRM_Core_Page_Basic { return 'CRM_Batch_BAO_Batch'; } - /** - * Get action Links. - * - */ - public function &links() { - } - /** * Get name of edit form. * @@ -96,8 +87,6 @@ class CRM_Financial_Page_Batch extends CRM_Core_Page_Basic { /** * Browse all entities. - * - * @return void */ public function browse() { $status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1); diff --git a/CRM/Financial/Page/BatchTransaction.php b/CRM/Financial/Page/BatchTransaction.php index b7a6500af1..1ede605618 100644 --- a/CRM/Financial/Page/BatchTransaction.php +++ b/CRM/Financial/Page/BatchTransaction.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ @@ -90,8 +88,6 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { // get the requested action @@ -118,15 +114,6 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic { return parent::run(); } - /** - * Browse all financial batch transactions. - * - * - * @return void - */ - public function browse() { - } - /** * Get name of edit form. * diff --git a/CRM/Financial/Page/FinancialAccount.php b/CRM/Financial/Page/FinancialAccount.php index 3998c30604..af18959995 100644 --- a/CRM/Financial/Page/FinancialAccount.php +++ b/CRM/Financial/Page/FinancialAccount.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -98,8 +96,6 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { // get the requested action @@ -120,9 +116,6 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { /** * Browse all custom data groups. - * - * - * @return void */ public function browse() { // get all custom groups sorted by weight diff --git a/CRM/Financial/Page/FinancialBatch.php b/CRM/Financial/Page/FinancialBatch.php index c17d467553..bbe47be138 100644 --- a/CRM/Financial/Page/FinancialBatch.php +++ b/CRM/Financial/Page/FinancialBatch.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -74,8 +72,6 @@ class CRM_Financial_Page_FinancialBatch extends CRM_Core_Page_Basic { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { $context = CRM_Utils_Request::retrieve('context', 'String', $this); diff --git a/CRM/Financial/Page/FinancialType.php b/CRM/Financial/Page/FinancialType.php index d4352885db..de0804506b 100644 --- a/CRM/Financial/Page/FinancialType.php +++ b/CRM/Financial/Page/FinancialType.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -104,8 +102,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { // get the requested action @@ -126,9 +122,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { /** * Browse all financial types. - * - * - * @return void */ public function browse() { // get all financial types sorted by weight @@ -167,7 +160,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { $action -= CRM_Core_Action::ENABLE; $action -= CRM_Core_Action::DISABLE; $action -= CRM_Core_Action::DELETE; - //continue; } else { if ($dao->is_active) { diff --git a/CRM/Financial/Page/FinancialTypeAccount.php b/CRM/Financial/Page/FinancialTypeAccount.php index caebcf5760..debb367b59 100644 --- a/CRM/Financial/Page/FinancialTypeAccount.php +++ b/CRM/Financial/Page/FinancialTypeAccount.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -93,8 +91,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { // get the requested action @@ -119,8 +115,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { /** * Browse all Financial Type Account data. - * - * @return void */ public function browse() { // get all Financial Type Account data sorted by weight @@ -166,7 +160,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { $action = array_sum(array_keys($this->links())); $links = self::links(); - //CRM-12492 + // CRM-12492 if ($dao->account_relationship == $relationTypeId) { unset($links[CRM_Core_Action::DELETE]); } @@ -200,8 +194,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { * * @param string $action * The action to be invoked. - * - * @return void */ public function edit($action) { // create a simple controller for editing CiviCRM Profile data -- 2.25.1