Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces full class name with self #962

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/code/core/Mage/Api2/Model/Acl/Global/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected function _beforeSave()
}

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

/** @var $helper Mage_Core_Helper_Data */
Expand All @@ -111,7 +111,7 @@ protected function _beforeSave()
*/
protected function _beforeDelete()
{
if (Mage_Api2_Model_Acl_Global_Role::isSystemRole($this)) {
if (self::isSystemRole($this)) {
/** @var $helper Mage_Core_Helper_Data */
$helper = Mage::helper('core');

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Model/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ final protected function _applyCollectionModifiers(Varien_Data_Collection_Db $co
$orderField = $this->getRequest()->getOrderField();

if (null !== $orderField) {
$operation = Mage_Api2_Model_Resource::OPERATION_ATTRIBUTE_READ;
$operation = self::OPERATION_ATTRIBUTE_READ;
if (!is_string($orderField)
|| !array_key_exists($orderField, $this->getAvailableAttributes($this->getUserType(), $operation))
) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Captcha/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function getConfigNode($id, $store = null)
*/
public function getFonts()
{
$node = Mage::getConfig()->getNode(Mage_Captcha_Helper_Data::XML_PATH_CAPTCHA_FONTS);
$node = Mage::getConfig()->getNode(self::XML_PATH_CAPTCHA_FONTS);
$fonts = array();
if ($node) {
foreach ($node->children() as $fontName => $fontNode) {
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Core/Model/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public function getDateFormat($type=null)
public function getDateFormatWithLongYear()
{
return preg_replace('/(?<!y)yy(?!y)/', 'yyyy',
$this->getTranslation(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, 'date'));
$this->getTranslation(self::FORMAT_TYPE_SHORT, 'date'));
}

/**
Expand Down Expand Up @@ -568,7 +568,7 @@ public function utcDate($store=null, $date, $includeTime = false, $format = null
{
$dateObj = $this->storeDate($store, $date, $includeTime);
$dateObj->set($date, $format);
$dateObj->setTimezone(Mage_Core_Model_Locale::DEFAULT_TIMEZONE);
$dateObj->setTimezone(self::DEFAULT_TIMEZONE);
return $dateObj;
}

Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Core/Model/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ public function isCurrentlySecure()
*/
public function getBaseCurrencyCode()
{
$configValue = $this->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE);
if ($configValue == Mage_Core_Model_Store::PRICE_SCOPE_GLOBAL) {
$configValue = $this->getConfig(self::XML_PATH_PRICE_SCOPE);
if ($configValue == self::PRICE_SCOPE_GLOBAL) {
return Mage::app()->getBaseCurrencyCode();
} else {
return $this->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE);
Expand Down Expand Up @@ -1146,7 +1146,7 @@ public function getCurrentUrl($fromStore = true)
$storeParsedQuery[$k] = $v;
}

if (!Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL, $this->getCode())) {
if (!Mage::getStoreConfigFlag(self::XML_PATH_STORE_IN_URL, $this->getCode())) {
$storeParsedQuery['___store'] = $this->getCode();
}
if ($fromStore !== false) {
Expand Down
8 changes: 4 additions & 4 deletions app/code/core/Mage/Directory/Model/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function getRate($toCurrency)
{
if (is_string($toCurrency)) {
$code = $toCurrency;
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
} elseif ($toCurrency instanceof self) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this still work if you override Mage_Directory_Model_Currency class with custom class?

Copy link
Contributor Author

@sreichel sreichel May 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, overrides still work ...

<?php

class A
{
    public static function test($class)
    {
        if ($class instanceof self) {
            echo 'yes';
        }
    }
}

class B extends A
{}

A::test(new B());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem will occur when people will override the class and copy some methods to change them, ending up with code:

<?php

class A
{
    public static function test($class)
    {
        if ($class instanceof self) {
            echo 'yes';
        }
    }
}

class B extends A
{
public static function test($class)
    {
        if ($class instanceof self) {
            echo 'yes';
        }
       //some additional code modification
    }
}

B::test(new A());

This will yeld wrong results.
So I'm against changing class name to self in "instanceof".
The logic of instanceof is to check whether sth implements a certain interface. Making it dynamic will cause hard to debug issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this break current code? Guess not.

It is just a problem if someone would copy&paste mehtods, w/o thinking about it .... For existing code it should not matter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change since it does not break anything and it is up to coders who copy and paste to do so correctly, I think that has always been the case. However, I see it as a minor point. @sreichel what is the case for doing this as it relates to the end goal to use PHPCS and PHPStan? If we don't include this change will it always be throwing up warnings/errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colinmollenhour this is not related to phpCS or phpStan ... it will not throw errors. Just want to have clean code ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, seems like a minor subjective issue so I will approve as-is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it's just making people life harder without much benefit.
so +1 for the change in general -1 for the "instanceof" change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it's just making people life harder without much benefit.

Mhh ... at the other hand it enforces coders to review their copy&paste-code a bit more. I'd leave this open for the next days and more opinios about that. OK?

$code = $toCurrency->getCurrencyCode();
} else {
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
Expand All @@ -158,7 +158,7 @@ public function getAnyRate($toCurrency)
{
if (is_string($toCurrency)) {
$code = $toCurrency;
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
} elseif ($toCurrency instanceof self) {
$code = $toCurrency->getCurrencyCode();
} else {
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
Expand Down Expand Up @@ -191,7 +191,7 @@ public function convert($price, $toCurrency = null)
}

throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(),
$toCurrency instanceof Mage_Directory_Model_Currency ? $toCurrency->getCode() : $toCurrency));
$toCurrency instanceof self ? $toCurrency->getCode() : $toCurrency));
}

/**
Expand Down Expand Up @@ -336,7 +336,7 @@ public function getConfigBaseCurrencies()
*/
public function getCurrencyRates($currency, $toCurrencies = null)
{
if ($currency instanceof Mage_Directory_Model_Currency) {
if ($currency instanceof self) {
$currency = $currency->getCode();
}
$data = $this->_getResource()->getCurrencyRates($currency, $toCurrencies);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,12 @@ protected function _saveProducts()
$previousType = $productType;
}
if (isset($rowData[self::COL_ATTR_SET]) && !is_null($rowData[self::COL_ATTR_SET])) {
$previousAttributeSet = $rowData[Mage_ImportExport_Model_Import_Entity_Product::COL_ATTR_SET];
$previousAttributeSet = $rowData[self::COL_ATTR_SET];
}
if (self::SCOPE_NULL == $rowScope) {
// for multiselect attributes only
if (!is_null($previousAttributeSet)) {
$rowData[Mage_ImportExport_Model_Import_Entity_Product::COL_ATTR_SET] = $previousAttributeSet;
$rowData[self::COL_ATTR_SET] = $previousAttributeSet;
}
if (is_null($productType) && !is_null($previousType)) {
$productType = $previousType;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Oauth/Model/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function authorize($userId, $userType)
*/
public function convertToAccess()
{
if (Mage_Oauth_Model_Token::TYPE_REQUEST != $this->getType()) {
if (self::TYPE_REQUEST != $this->getType()) {
Mage::throwException('Can not convert due to token is not request type');
}
/** @var $helper Mage_Oauth_Helper_Data */
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Paypal/Block/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function _getBlock()
$this->_block = $this->getAction()
->getLayout()
->createBlock('paypal/'.$this->_paymentMethodCode.'_iframe');
if (!$this->_block instanceof Mage_Paypal_Block_Iframe) {
if (!$this->_block instanceof self) {
Mage::throwException('Invalid block type');
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Paypal/Model/Express/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function start($returnUrl, $cancelUrl, $button = null)
public function canSkipOrderReviewStep()
{
$isOnepageCheckout = !$this->_quote->getPayment()
->getAdditionalInformation(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON);
->getAdditionalInformation(self::PAYMENT_INFO_BUTTON);
return $this->_config->isOrderReviewStepDisabled() && $isOnepageCheckout;
}

Expand Down Expand Up @@ -619,7 +619,7 @@ public function place($token, $shippingMethodCode = null)

// commence redirecting to finish payment, if paypal requires it
if ($order->getPayment()->getAdditionalInformation(
Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_REDIRECT
self::PAYMENT_INFO_TRANSPORT_REDIRECT
)) {
$this->_redirectUrl = $this->_config->getExpressCheckoutCompleteUrl($token);
}
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/PaypalUk/Model/Pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function _getParentTransactionId(Varien_Object $payment)
{
if ($payment->getParentTransactionId()) {
return $payment->getTransaction($payment->getParentTransactionId())
->getAdditionalInformation(Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID);
->getAdditionalInformation(self::TRANSPORT_PAYFLOW_TXN_ID);
}
return $payment->getParentTransactionId();
}
Expand All @@ -103,7 +103,7 @@ protected function _importCaptureResultToPayment($api, $payment)
$payment->setTransactionId($api->getPaypalTransactionId())
->setIsTransactionClosed(false)
->setTransactionAdditionalInfo(
Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID,
self::TRANSPORT_PAYFLOW_TXN_ID,
$api->getTransactionId()
);
$payment->setPreparedMessage(
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function _importRefundResultToPayment($api, $payment, $canRefundMore)
->setIsTransactionClosed(1) // refund initiated by merchant
->setShouldCloseParentTransaction(!$canRefundMore)
->setTransactionAdditionalInfo(
Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID,
self::TRANSPORT_PAYFLOW_TXN_ID,
$api->getTransactionId()
);
$payment->setPreparedMessage(
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Persistent/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected function _afterLoad()
public function loadByCookieKey($key = null)
{
if (is_null($key)) {
$key = Mage::getSingleton('core/cookie')->get(Mage_Persistent_Model_Session::COOKIE_NAME);
$key = Mage::getSingleton('core/cookie')->get(self::COOKIE_NAME);
}
if ($key) {
$this->load($key, 'key');
Expand Down Expand Up @@ -191,7 +191,7 @@ public function deleteByCustomerId($customerId, $clearCookie = true)
*/
public function removePersistentCookie()
{
Mage::getSingleton('core/cookie')->delete(Mage_Persistent_Model_Session::COOKIE_NAME);
Mage::getSingleton('core/cookie')->delete(self::COOKIE_NAME);
return $this;
}

Expand Down Expand Up @@ -229,7 +229,7 @@ public function deleteExpired($websiteId = null)
* @return Mage_Core_Model_Abstract
*/
protected function _afterDeleteCommit() {
Mage::getSingleton('core/cookie')->delete(Mage_Persistent_Model_Session::COOKIE_NAME);
Mage::getSingleton('core/cookie')->delete(self::COOKIE_NAME);
return parent::_afterDeleteCommit();
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Sales/Model/Order/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ public function getRealProductType()
*/
public function addChildItem($item)
{
if ($item instanceof Mage_Sales_Model_Order_Item) {
if ($item instanceof self) {
$this->_children[] = $item;
} else if (is_array($item)) {
$this->_children = array_merge($this->_children, $item);
Expand Down
10 changes: 5 additions & 5 deletions app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,11 @@ public function isVoided()
public function getTransactionTypes()
{
return array(
Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER => Mage::helper('sales')->__('Order'),
Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH => Mage::helper('sales')->__('Authorization'),
Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE => Mage::helper('sales')->__('Capture'),
Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID => Mage::helper('sales')->__('Void'),
Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND => Mage::helper('sales')->__('Refund')
self::TYPE_ORDER => Mage::helper('sales')->__('Order'),
self::TYPE_AUTH => Mage::helper('sales')->__('Authorization'),
self::TYPE_CAPTURE => Mage::helper('sales')->__('Capture'),
self::TYPE_VOID => Mage::helper('sales')->__('Void'),
self::TYPE_REFUND => Mage::helper('sales')->__('Refund')
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Sales/Model/Quote/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected function _populateBeforeSaveData()
*/
protected function _isSameAsBilling()
{
return ($this->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING
return ($this->getAddressType() === self::TYPE_SHIPPING
&& ($this->_isNotRegisteredCustomer() || $this->_isDefaultShippingNullOrSameAsBillingAddress()));
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/SalesRule/Helper/Coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ public function getCharset($format)
*/
public function getCodeSeparator()
{
return (string)Mage::app()->getConfig()->getNode(Mage_SalesRule_Helper_Coupon::XML_CHARSET_SEPARATOR);
return (string)Mage::app()->getConfig()->getNode(self::XML_CHARSET_SEPARATOR);
}
}
6 changes: 3 additions & 3 deletions app/code/core/Mage/SalesRule/Model/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ public function getCouponTypes()
{
if ($this->_couponTypes === null) {
$this->_couponTypes = array(
Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON => Mage::helper('salesrule')->__('No Coupon'),
Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC => Mage::helper('salesrule')->__('Specific Coupon'),
self::COUPON_TYPE_NO_COUPON => Mage::helper('salesrule')->__('No Coupon'),
self::COUPON_TYPE_SPECIFIC => Mage::helper('salesrule')->__('Specific Coupon'),
);
$transport = new Varien_Object(array(
'coupon_types' => $this->_couponTypes,
Expand All @@ -397,7 +397,7 @@ public function getCouponTypes()
Mage::dispatchEvent('salesrule_rule_get_coupon_types', array('transport' => $transport));
$this->_couponTypes = $transport->getCouponTypes();
if ($transport->getIsCouponTypeAutoVisible()) {
$this->_couponTypes[Mage_SalesRule_Model_Rule::COUPON_TYPE_AUTO] = Mage::helper('salesrule')->__('Auto');
$this->_couponTypes[self::COUPON_TYPE_AUTO] = Mage::helper('salesrule')->__('Auto');
}
}
return $this->_couponTypes;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Shipping/Model/Rate/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function append($result)
if ($result instanceof Mage_Shipping_Model_Rate_Result_Abstract) {
$this->_rates[] = $result;
}
elseif ($result instanceof Mage_Shipping_Model_Rate_Result) {
elseif ($result instanceof self) {
$rates = $result->getAllRates();
foreach ($rates as $rate) {
$this->append($rate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page extends Zend_Pdf_Page
*/
public function __construct($param1, $param2 = null, $param3 = null)
{
if ($param1 instanceof Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page
if ($param1 instanceof self
&& $param2 === null && $param3 === null
) {
$this->_contents = $param1->getContents();
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/XmlConnect/Model/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ protected function _construct()
*/
public function getIsSubmitted()
{
return $this->getStatus() == Mage_XmlConnect_Model_Application::APP_STATUS_SUCCESS;
return $this->getStatus() === self::APP_STATUS_SUCCESS;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions app/code/core/Mage/XmlConnect/Model/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Mage_XmlConnect_Model_Configuration extends Mage_Core_Model_Abstract
public function isActiveAdminApp()
{
$isActiveSetting = $this->_getAdminApplicationSettings(
Mage_XmlConnect_Model_Configuration::CONFIG_PATH_AA_SETTINGS . '/is_active'
self::CONFIG_PATH_AA_SETTINGS . '/is_active'
);
return $isActiveSetting ? (bool)$isActiveSetting['value'] : false;
}
Expand All @@ -95,7 +95,7 @@ public function isActiveAdminApp()
public function saveIsActiveAdminApp($isActive)
{
$this->_getConfigDataModel()->saveConfig(
Mage_XmlConnect_Model_Configuration::CONFIG_PATH_AA_SETTINGS . '/is_active', (int)$isActive
self::CONFIG_PATH_AA_SETTINGS . '/is_active', (int)$isActive
);
return $this;
}
Expand Down Expand Up @@ -171,7 +171,7 @@ public function getDeviceStaticPages()
public function getPreviousLocalizationHash()
{
$localizationHashSetting = $this->_getAdminApplicationSettings(
Mage_XmlConnect_Model_Configuration::CONFIG_PATH_AA_SETTINGS . '/localization_hash'
self::CONFIG_PATH_AA_SETTINGS . '/localization_hash'
);
return $localizationHashSetting ? $localizationHashSetting['value'] : null;

Expand All @@ -186,7 +186,7 @@ public function getPreviousLocalizationHash()
public function setPreviousLocalizationHash($hash)
{
$this->_getConfigDataModel()->saveConfig(
Mage_XmlConnect_Model_Configuration::CONFIG_PATH_AA_SETTINGS . '/localization_hash', $hash
self::CONFIG_PATH_AA_SETTINGS . '/localization_hash', $hash
);
return $this;
}
Expand Down
8 changes: 4 additions & 4 deletions app/code/core/Mage/XmlConnect/Model/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ public function getProcessedTemplate(array $variables = array())
EOT;

switch ($this->getData('type')) {
case Mage_XmlConnect_Model_Queue::MESSAGE_TYPE_AIRMAIL:
case self::MESSAGE_TYPE_AIRMAIL:
$html = sprintf($htmlDescription, Mage::helper('xmlconnect')->__('Push title'))
. $this->getPushTitle()
. sprintf($htmlDescription, Mage::helper('xmlconnect')->__('Message title'))
. $this->getMessageTitle()
. sprintf($htmlDescription, Mage::helper('xmlconnect')->__('Message content'))
. $processor->filter($this->getContent());
break;
case Mage_XmlConnect_Model_Queue::MESSAGE_TYPE_PUSH:
case self::MESSAGE_TYPE_PUSH:
default:
$html = sprintf($htmlDescription, Mage::helper('xmlconnect')->__('Push title'))
. $this->getPushTitle();
Expand Down Expand Up @@ -249,7 +249,7 @@ public function reset()
public function getAirmailBroadcastParams()
{
$notificationType = Mage::getStoreConfig(
sprintf(Mage_XmlConnect_Model_Queue::XML_PATH_NOTIFICATION_TYPE, $this->getApplicationType())
sprintf(self::XML_PATH_NOTIFICATION_TYPE, $this->getApplicationType())
);

$payload = array(
Expand Down Expand Up @@ -280,7 +280,7 @@ public function getAirmailBroadcastParams()
public function getPushBroadcastParams()
{
$notificationType = Mage::getStoreConfig(
sprintf(Mage_XmlConnect_Model_Queue::XML_PATH_NOTIFICATION_TYPE, $this->getApplicationType())
sprintf(self::XML_PATH_NOTIFICATION_TYPE, $this->getApplicationType())
);

$payload = array(
Expand Down