diff --git a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php index 1a0f977a346..52e3d486eb1 100644 --- a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php @@ -30,9 +30,16 @@ * @category Mage * @package Mage_CurrencySymbol * @author Magento Core Team + * + * @property string $_blockGroup */ -class Mage_Currencysymbol_Block_Adminhtml_System_Currencysymbol extends Mage_Adminhtml_Block_Widget_Form +class Mage_CurrencySymbol_Block_Adminhtml_System_Currencysymbol extends Mage_Adminhtml_Block_Widget_Form { + /** + * @var string + */ + private $_controller; + /** * Constructor. Initialization required variables for class instance. */ @@ -77,7 +84,7 @@ public function getHeader() */ public function getSaveButtonHtml() { - /** @var $block Mage_Core_Block_Abstract */ + /** @var Mage_Core_Block_Abstract $block */ $block = $this->getLayout()->createBlock('adminhtml/widget_button'); $block->setData(array( 'label' => Mage::helper('currencysymbol')->__('Save Currency Symbols'), @@ -125,7 +132,7 @@ public function getStoreId() */ public function getCurrencySymbolsData() { - if(!$this->_symbolsData) { + if (!$this->_symbolsData) { $this->_symbolsData = Mage::getModel('currencysymbol/system_currencysymbol') ->getCurrencySymbolsData(); } diff --git a/app/code/core/Mage/CurrencySymbol/Helper/Data.php b/app/code/core/Mage/CurrencySymbol/Helper/Data.php index 8812e66d6fe..9cb7aa7a147 100644 --- a/app/code/core/Mage/CurrencySymbol/Helper/Data.php +++ b/app/code/core/Mage/CurrencySymbol/Helper/Data.php @@ -44,7 +44,7 @@ public function getCurrencyOptions($baseCode) { $currencyOptions = array(); $currencySymbol = Mage::getModel('currencysymbol/system_currencysymbol'); - if($currencySymbol) { + if ($currencySymbol) { $customCurrencySymbol = $currencySymbol->getCurrencySymbol($baseCode); if ($customCurrencySymbol) { diff --git a/app/code/core/Mage/CurrencySymbol/Model/Observer.php b/app/code/core/Mage/CurrencySymbol/Model/Observer.php index f2b63e10aef..d71295eaaeb 100644 --- a/app/code/core/Mage/CurrencySymbol/Model/Observer.php +++ b/app/code/core/Mage/CurrencySymbol/Model/Observer.php @@ -37,7 +37,7 @@ class Mage_CurrencySymbol_Model_Observer * Generate options for currency displaying with custom currency symbol * * @param Varien_Event_Observer $observer - * @return Mage_CurrencySymbol_Model__Observer + * @return $this */ public function currencyDisplayOptions(Varien_Event_Observer $observer) { diff --git a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php index 96bfec61427..919f55339bd 100644 --- a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php @@ -30,6 +30,8 @@ * @category Mage * @package Mage_CurrencySymbol * @author Magento Core Team + * + * @method $this resetValues() */ class Mage_CurrencySymbol_Model_System_Currencysymbol { @@ -83,10 +85,10 @@ class Mage_CurrencySymbol_Model_System_Currencysymbol /** * Sets store Id * - * @param $storeId + * @param int $storeId * @return $this */ - public function setStoreId($storeId=null) + public function setStoreId($storeId = null) { $this->_storeId = $storeId; $this->_symbolsData = array(); @@ -97,10 +99,10 @@ public function setStoreId($storeId=null) /** * Sets website Id * - * @param $websiteId + * @param int $websiteId * @return $this */ - public function setWebsiteId($websiteId=null) + public function setWebsiteId($websiteId = null) { $this->_websiteId = $websiteId; $this->_symbolsData = array(); @@ -126,7 +128,6 @@ public function getCurrencySymbolsData() Mage::getStoreConfig(self::XML_PATH_ALLOWED_CURRENCIES, null) ); - /* @var $storeModel Mage_Adminhtml_Model_System_Store */ $storeModel = Mage::getSingleton('adminhtml/system_store'); foreach ($storeModel->getWebsiteCollection() as $website) { $websiteShow = false; @@ -158,7 +159,7 @@ public function getCurrencySymbolsData() $currentSymbols = $this->_unserializeStoreConfig(self::XML_PATH_CUSTOM_CURRENCY_SYMBOL); - /** @var $locale Mage_Core_Model_Locale */ + /** @var Mage_Core_Model_Locale $locale */ $locale = Mage::app()->getLocale(); foreach ($allowedCurrencies as $code) { if (!$symbol = $locale->getTranslation($code, 'currencysymbol')) { @@ -191,15 +192,16 @@ public function getCurrencySymbolsData() /** * Saves currency symbol to config * - * @param $symbols array + * @param array $symbols * @return $this */ - public function setCurrencySymbolsData($symbols=array()) + public function setCurrencySymbolsData($symbols = array()) { foreach ($this->getCurrencySymbolsData() as $code => $values) { if (isset($symbols[$code])) { - if ($symbols[$code] == $values['parentSymbol'] || empty($symbols[$code])) - unset($symbols[$code]); + if ($symbols[$code] == $values['parentSymbol'] || empty($symbols[$code])) { + unset($symbols[$code]); + } } } if ($symbols) { @@ -215,7 +217,8 @@ public function setCurrencySymbolsData($symbols=array()) ->setGroups($value) ->save(); - Mage::dispatchEvent('admin_system_config_changed_section_currency_before_reinit', + Mage::dispatchEvent( + 'admin_system_config_changed_section_currency_before_reinit', array('website' => $this->_websiteId, 'store' => $this->_storeId) ); @@ -225,7 +228,8 @@ public function setCurrencySymbolsData($symbols=array()) $this->clearCache(); - Mage::dispatchEvent('admin_system_config_changed_section_currency', + Mage::dispatchEvent( + 'admin_system_config_changed_section_currency', array('website' => $this->_websiteId, 'store' => $this->_storeId) ); @@ -235,8 +239,8 @@ public function setCurrencySymbolsData($symbols=array()) /** * Returns custom currency symbol by currency code * - * @param $code - * @return bool|string + * @param string $code + * @return false|string */ public function getCurrencySymbol($code) { @@ -251,7 +255,7 @@ public function getCurrencySymbol($code) /** * Clear translate cache * - * @return Saas_Translate_Helper_Data + * @return $this */ public function clearCache() {