Skip to content

Commit

Permalink
[~TASK] Simplified documentation/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
therouv committed Mar 17, 2012
1 parent 1433667 commit 8ad9123
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 156 deletions.
27 changes: 8 additions & 19 deletions src/app/code/community/Mage/Debit/Block/Account/Data.php
Expand Up @@ -3,9 +3,9 @@
* This file is part of the Mage_Debit module.
*
* PHP version 5
*
*
* NOTICE OF LICENSE
*
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
Expand All @@ -24,7 +24,7 @@
*/
/**
* Debit Form Block for customer account page
*
*
* @category Mage
* @package Mage_Debit
* @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
Expand All @@ -37,10 +37,8 @@ class Mage_Debit_Block_Account_Data
extends Mage_Customer_Block_Account_Dashboard
{
/**
* getBankName
*
* Returns the bank name
*
*
* @return string Bankname
*/
public function getBankName()
Expand All @@ -57,10 +55,8 @@ public function getBankName()
}

/**
* getAccountBLZ
*
* Returns the account blz of the specific account
*
*
* @return string BLZ
*/
public function getAccountBLZ()
Expand All @@ -69,10 +65,8 @@ public function getAccountBLZ()
}

/**
* getAccountName
*
* Returns the account owner name of the specific account
*
*
* @return string Name
*/
public function getAccountName()
Expand All @@ -81,10 +75,8 @@ public function getAccountName()
}

/**
* getAccountNumber
*
* Returns the number of the specific account
*
*
* @return string Account Number
*/
public function getAccountNumber()
Expand All @@ -93,13 +85,10 @@ public function getAccountNumber()
}

/**
* _getAccountData
*
* Returns the specific value of the requested field from the
* customer model.
*
*
* @param string $field Attribute to get
*
* @return string Data
*/
protected function _getAccountData($field)
Expand Down
5 changes: 5 additions & 0 deletions src/app/code/community/Mage/Debit/Block/Adminhtml/Order.php
Expand Up @@ -33,6 +33,11 @@
*/
class Mage_Debit_Block_Adminhtml_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
$this->_controller = 'adminhtml_order';
Expand Down
39 changes: 11 additions & 28 deletions src/app/code/community/Mage/Debit/Block/Form.php
Expand Up @@ -3,9 +3,9 @@
* This file is part of the Mage_Debit module.
*
* PHP version 5
*
*
* NOTICE OF LICENSE
*
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
Expand All @@ -24,7 +24,7 @@
*/
/**
* Debit Form Block
*
*
* @category Mage
* @package Mage_Debit
* @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
Expand All @@ -36,10 +36,8 @@
class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
{
/**
* _construct
*
* Construct payment form block and set template
*
*
* @return void
*/
protected function _construct()
Expand All @@ -49,10 +47,8 @@ protected function _construct()
}

/**
* getBankName
*
* Returns the account bankname if applicable from the payment info instance
*
*
* @return string Bankname/Error
*/
public function getBankName()
Expand All @@ -69,10 +65,8 @@ public function getBankName()
}

/**
* getAccountBLZ
*
* Returns the account blz from the payment info instance
*
*
* @return string BLZ
*/
public function getAccountBLZ()
Expand All @@ -90,10 +84,8 @@ public function getAccountBLZ()
}

/**
* getAccountName
*
* Returns the account name from the payment info instance
*
*
* @return string Name
*/
public function getAccountName()
Expand All @@ -105,10 +97,8 @@ public function getAccountName()
}

/**
* getAccountNumber
*
* Returns the account number from the payment info instance
*
*
* @return string Number
*/
public function getAccountNumber()
Expand All @@ -124,13 +114,10 @@ public function getAccountNumber()
}

/**
* _getAccountData
*
* Returns the specific value of the requested field from the
* customer model.
*
*
* @param string $field Attribute to get
*
* @return string Data
*/
protected function _getAccountData($field)
Expand All @@ -146,10 +133,8 @@ protected function _getAccountData($field)
}

/**
* getCustomer
*
* Returns the current customer
*
*
* @return Mage_Customer_Model_Customer Customer
*/
public function getCustomer()
Expand All @@ -161,10 +146,8 @@ public function getCustomer()
}

/**
* getCheckoutValidBlz
*
* Returns the config setting if checkout is only allowed with a valid BLZ
*
*
* @return boolean true/false
*/
public function getCheckoutValidBlz()
Expand Down
30 changes: 9 additions & 21 deletions src/app/code/community/Mage/Debit/Block/Info.php
Expand Up @@ -3,9 +3,9 @@
* This file is part of the Mage_Debit module.
*
* PHP version 5
*
*
* NOTICE OF LICENSE
*
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
Expand All @@ -24,7 +24,7 @@
*/
/**
* Debit Info Block
*
*
* @category Mage
* @package Mage_Debit
* @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
Expand All @@ -36,10 +36,8 @@
class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
{
/**
* _construct
*
* Construct payment info block and set template
*
*
* @return void
*/
protected function _construct()
Expand All @@ -49,12 +47,8 @@ protected function _construct()
}

/**
* toPdf
*
* Sets the template for PDF print-outs
*
* @returns string Text for PDF
*
*
* @return string Text for PDF print-out
*/
public function toPdf()
Expand All @@ -64,10 +58,8 @@ public function toPdf()
}

/**
* isEmailContext
*
* Checks if we are in the email context
*
*
* @return boolean true/false
*/
public function isEmailContext()
Expand All @@ -82,18 +74,16 @@ public function isEmailContext()
return true; // Admin
} else {
return false; // Admin View
}
}
} else {
return true; // Frontend
}
}
}

/**
* sendDataInEmail
*
* Returns the config setting if bank data should be send in the email
*
*
* @return boolean true/false
*/
public function sendDataInEmail()
Expand All @@ -103,10 +93,8 @@ public function sendDataInEmail()
}

/**
* getEmailData
*
* Returns email data and mask the data if necessary
*
*
* @return array Bank data
*/
public function getEmailData()
Expand Down
15 changes: 0 additions & 15 deletions src/app/code/community/Mage/Debit/Helper/Data.php
Expand Up @@ -36,12 +36,9 @@
class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
{
/**
* getBankByBlz
*
* Returns the bankname by given blz
*
* @param string $blz BLZ
*
* @return null|string Bank Name
*/
public function getBankByBlz($blz)
Expand All @@ -68,8 +65,6 @@ public function getBankByBlz($blz)
}

/**
* _loadBlzCache
*
* Loads the blz data from cache
*
* @return mixed|false Cache data
Expand All @@ -83,12 +78,9 @@ protected function _loadBlzCache()
}

/**
* _saveBlzCache
*
* Saves the blz data in the cache
*
* @param array $data Blz data
*
* @return Mage_Debit_Helper_Data Self.
*/
protected function _saveBlzCache($data)
Expand All @@ -101,8 +93,6 @@ protected function _saveBlzCache($data)
}

/**
* _getCacheLifetime
*
* Returns the cache lifetime for the blz data.
*
* @return int Lifetime
Expand All @@ -113,8 +103,6 @@ protected function _getCacheLifetime()
}

/**
* _getCacheKey
*
* Returns the cache key for the blz data.
*
* @return string Cache key
Expand All @@ -125,8 +113,6 @@ protected function _getCacheKey()
}

/**
* _getCacheTags
*
* Returns the CONFIG cache tag
*
* @return array Cache tags
Expand All @@ -140,7 +126,6 @@ protected function _getCacheTags()
* sanitizeData
*
* @param string $data Data
*
* @return string The sanitized string
*/
public function sanitizeData($data)
Expand Down

0 comments on commit 8ad9123

Please sign in to comment.