Skip to content

Commit 676a4df

Browse files
sreichelfballiano
authored andcommitted
Replaced full class name with self (#2749)
1 parent 0a13e00 commit 676a4df

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

app/code/core/Mage/Api2/Model/Acl/Global/Role.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function _beforeSave()
8080
}
8181

8282
//check and protect guest role
83-
if (Mage_Api2_Model_Acl_Global_Role::isSystemRole($this)
83+
if (self::isSystemRole($this)
8484
&& $this->getRoleName() != $this->getOrigData('role_name')) {
8585

8686
/** @var Mage_Core_Helper_Data $helper */
@@ -102,7 +102,7 @@ protected function _beforeSave()
102102
*/
103103
protected function _beforeDelete()
104104
{
105-
if (Mage_Api2_Model_Acl_Global_Role::isSystemRole($this)) {
105+
if (self::isSystemRole($this)) {
106106
/** @var Mage_Core_Helper_Data $helper */
107107
$helper = Mage::helper('core');
108108

app/code/core/Mage/Api2/Model/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ final protected function _applyCollectionModifiers(Varien_Data_Collection_Db $co
736736
$orderField = $this->getRequest()->getOrderField();
737737

738738
if ($orderField !== null) {
739-
$operation = Mage_Api2_Model_Resource::OPERATION_ATTRIBUTE_READ;
739+
$operation = self::OPERATION_ATTRIBUTE_READ;
740740
if (!is_string($orderField)
741741
|| !array_key_exists($orderField, $this->getAvailableAttributes($this->getUserType(), $operation))
742742
) {

app/code/core/Mage/Captcha/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getConfigNode($id, $store = null)
103103
*/
104104
public function getFonts()
105105
{
106-
$node = Mage::getConfig()->getNode(Mage_Captcha_Helper_Data::XML_PATH_CAPTCHA_FONTS);
106+
$node = Mage::getConfig()->getNode(self::XML_PATH_CAPTCHA_FONTS);
107107
$fonts = [];
108108
if ($node) {
109109
foreach ($node->children() as $fontName => $fontNode) {

app/code/core/Mage/Core/Model/Locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public function utcDate($store, $date, $includeTime = false, $format = null)
576576
{
577577
$dateObj = $this->storeDate($store, $date, $includeTime);
578578
$dateObj->set($date, $format);
579-
$dateObj->setTimezone(Mage_Core_Model_Locale::DEFAULT_TIMEZONE);
579+
$dateObj->setTimezone(self::DEFAULT_TIMEZONE);
580580
return $dateObj;
581581
}
582582

app/code/core/Mage/Core/Model/Store.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ public function isCurrentlySecure()
825825
*/
826826
public function getBaseCurrencyCode()
827827
{
828-
$configValue = $this->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE);
829-
if ($configValue == Mage_Core_Model_Store::PRICE_SCOPE_GLOBAL) {
828+
$configValue = $this->getConfig(self::XML_PATH_PRICE_SCOPE);
829+
if ($configValue == self::PRICE_SCOPE_GLOBAL) {
830830
return Mage::app()->getBaseCurrencyCode();
831831
} else {
832832
return $this->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE);
@@ -1174,7 +1174,7 @@ public function getCurrentUrl($fromStore = true)
11741174
$storeParsedQuery[$k] = $v;
11751175
}
11761176

1177-
if (!Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL, $this->getCode())) {
1177+
if (!Mage::getStoreConfigFlag(self::XML_PATH_STORE_IN_URL, $this->getCode())) {
11781178
$storeParsedQuery['___store'] = $this->getCode();
11791179
}
11801180
if ($fromStore !== false) {

app/code/core/Mage/Directory/Model/Currency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getRate($toCurrency)
131131
{
132132
if (is_string($toCurrency)) {
133133
$code = $toCurrency;
134-
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
134+
} elseif ($toCurrency instanceof self) {
135135
$code = $toCurrency->getCurrencyCode();
136136
} else {
137137
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));

app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,12 +1472,12 @@ protected function _saveProducts()
14721472
$previousType = $productType;
14731473
}
14741474
if (isset($rowData[self::COL_ATTR_SET]) && !is_null($rowData[self::COL_ATTR_SET])) {
1475-
$previousAttributeSet = $rowData[Mage_ImportExport_Model_Import_Entity_Product::COL_ATTR_SET];
1475+
$previousAttributeSet = $rowData[self::COL_ATTR_SET];
14761476
}
14771477
if (self::SCOPE_NULL == $rowScope) {
14781478
// for multiselect attributes only
14791479
if (!is_null($previousAttributeSet)) {
1480-
$rowData[Mage_ImportExport_Model_Import_Entity_Product::COL_ATTR_SET] = $previousAttributeSet;
1480+
$rowData[self::COL_ATTR_SET] = $previousAttributeSet;
14811481
}
14821482
if (is_null($productType) && !is_null($previousType)) {
14831483
$productType = $previousType;

app/code/core/Mage/Oauth/Model/Token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function authorize($userId, $userType)
145145
*/
146146
public function convertToAccess()
147147
{
148-
if (Mage_Oauth_Model_Token::TYPE_REQUEST != $this->getType()) {
148+
if (self::TYPE_REQUEST != $this->getType()) {
149149
Mage::throwException('Can not convert due to token is not request type');
150150
}
151151
/** @var Mage_Oauth_Helper_Data $helper */

app/code/core/Mage/Paypal/Model/Express/Checkout.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function start($returnUrl, $cancelUrl, $button = null)
404404
public function canSkipOrderReviewStep()
405405
{
406406
$isOnepageCheckout = !$this->_quote->getPayment()
407-
->getAdditionalInformation(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON);
407+
->getAdditionalInformation(self::PAYMENT_INFO_BUTTON);
408408
return $this->_config->isOrderReviewStepDisabled() && $isOnepageCheckout;
409409
}
410410

@@ -619,8 +619,8 @@ public function place($token, $shippingMethodCode = null)
619619

620620
// commence redirecting to finish payment, if paypal requires it
621621
if ($order->getPayment()->getAdditionalInformation(
622-
Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_REDIRECT
623-
)) {
622+
self::PAYMENT_INFO_TRANSPORT_REDIRECT
623+
)) {
624624
$this->_redirectUrl = $this->_config->getExpressCheckoutCompleteUrl($token);
625625
}
626626

app/code/core/Mage/PaypalUk/Model/Pro.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function _getParentTransactionId(Varien_Object $payment)
8686
{
8787
if ($payment->getParentTransactionId()) {
8888
return $payment->getTransaction($payment->getParentTransactionId())
89-
->getAdditionalInformation(Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID);
89+
->getAdditionalInformation(self::TRANSPORT_PAYFLOW_TXN_ID);
9090
}
9191
return $payment->getParentTransactionId();
9292
}
@@ -102,7 +102,7 @@ protected function _importCaptureResultToPayment($api, $payment)
102102
$payment->setTransactionId($api->getPaypalTransactionId())
103103
->setIsTransactionClosed(false)
104104
->setTransactionAdditionalInfo(
105-
Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID,
105+
self::TRANSPORT_PAYFLOW_TXN_ID,
106106
$api->getTransactionId()
107107
);
108108
$payment->setPreparedMessage(
@@ -139,7 +139,7 @@ protected function _importRefundResultToPayment($api, $payment, $canRefundMore)
139139
->setIsTransactionClosed(1) // refund initiated by merchant
140140
->setShouldCloseParentTransaction(!$canRefundMore)
141141
->setTransactionAdditionalInfo(
142-
Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID,
142+
self::TRANSPORT_PAYFLOW_TXN_ID,
143143
$api->getTransactionId()
144144
);
145145
$payment->setPreparedMessage(

0 commit comments

Comments
 (0)