Skip to content

Commit

Permalink
Bump PHPCSFixer to 3.15.1 + new fixes required (#3106)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Mar 20, 2023
1 parent 612e90c commit cbfb537
Show file tree
Hide file tree
Showing 30 changed files with 225 additions and 278 deletions.
1 change: 0 additions & 1 deletion app/code/core/Mage/Admin/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function actionPreDispatchAdmin($observer)
}
if (!$user || !$user->getId()) {
if ($request->getPost('login')) {

/** @var Mage_Core_Model_Session $coreSession */
$coreSession = Mage::getSingleton('core/session');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function getElementHtml()
*/
public function getContentHtml()
{

/** @var Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content $content */
$content = Mage::getSingleton('core/layout')
->createBlock('adminhtml/catalog_product_helper_form_gallery_content');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ protected function _initProduct()
/** @var Mage_Catalog_Model_Product $configProduct */
$data = [];
foreach ($configProduct->getTypeInstance()->getEditableAttributes() as $attribute) {

/** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */
if (!$attribute->getIsUnique()
&& $attribute->getFrontend()->getInputType() != 'gallery'
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function getPostResources()
}
break;

//no default
//no default
}
}
return $resources;
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Api2/Model/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function dispatch()
$this->getResponse()->setHttpResponseCode(Mage_Api2_Model_Server::HTTP_MULTI_STATUS);
}
break;
/* Retrieve */
/* Retrieve */
case self::ACTION_TYPE_ENTITY . self::OPERATION_RETRIEVE:
$this->_errorIfMethodNotExist('_retrieve');
$retrievedData = $this->_retrieve();
Expand All @@ -243,7 +243,7 @@ public function dispatch()
$filteredData = $this->getFilter()->collectionOut($retrievedData);
$this->_render($filteredData);
break;
/* Update */
/* Update */
case self::ACTION_TYPE_ENTITY . self::OPERATION_UPDATE:
$this->_errorIfMethodNotExist('_update');
$requestData = $this->getRequest()->getBodyParams();
Expand All @@ -267,7 +267,7 @@ public function dispatch()
$this->_render($this->getResponse()->getMessages());
$this->getResponse()->setHttpResponseCode(Mage_Api2_Model_Server::HTTP_MULTI_STATUS);
break;
/* Delete */
/* Delete */
case self::ACTION_TYPE_ENTITY . self::OPERATION_DELETE:
$this->_errorIfMethodNotExist('_delete');
$this->_delete();
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Catalog/Block/Widget/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function getHref()
$idPath = explode('/', $this->_getData('id_path'));

if (isset($idPath[0]) && isset($idPath[1]) && $idPath[0] == 'product') {

/** @var Mage_Catalog_Helper_Product $helper */
$helper = $this->_getFactory()->getHelper('catalog/product');
$productId = $idPath[1];
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public function getResource()
if (!$this->_resource) {
$this->_resource = Mage::getResourceSingleton('catalog_entity/convert');
#->loadStores()
#->loadProducts()
#->loadAttributeSets()
#->loadAttributeOptions();
#->loadProducts()
#->loadAttributeSets()
#->loadAttributeOptions();
}
return $this->_resource;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function _getCacheKey()
. '_CURR_' . Mage::app()->getStore()->getCurrentCurrencyCode()
. '_ATTR_' . $this->getAttributeModel()->getAttributeCode()
. '_LOC_'
;
;
$taxReq = Mage::getSingleton('tax/calculation')->getDefaultRateRequest();
$key .= implode('_', $taxReq->getData());

Expand Down
48 changes: 24 additions & 24 deletions app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,42 +297,42 @@ public function info($attribute)
// set additional fields to different types
switch ($model->getFrontendInput()) {
case 'text':
$result['additional_fields'] = [
'frontend_class' => $model->getFrontendClass(),
'is_html_allowed_on_front' => $model->getIsHtmlAllowedOnFront(),
'used_for_sort_by' => $model->getUsedForSortBy()
];
$result['additional_fields'] = [
'frontend_class' => $model->getFrontendClass(),
'is_html_allowed_on_front' => $model->getIsHtmlAllowedOnFront(),
'used_for_sort_by' => $model->getUsedForSortBy()
];
break;
case 'textarea':
$result['additional_fields'] = [
'is_wysiwyg_enabled' => $model->getIsWysiwygEnabled(),
'is_html_allowed_on_front' => $model->getIsHtmlAllowedOnFront(),
];
$result['additional_fields'] = [
'is_wysiwyg_enabled' => $model->getIsWysiwygEnabled(),
'is_html_allowed_on_front' => $model->getIsHtmlAllowedOnFront(),
];
break;
case 'date':
case 'boolean':
$result['additional_fields'] = [
'used_for_sort_by' => $model->getUsedForSortBy()
];
$result['additional_fields'] = [
'used_for_sort_by' => $model->getUsedForSortBy()
];
break;
case 'multiselect':
$result['additional_fields'] = [
'is_filterable' => $model->getIsFilterable(),
'is_filterable_in_search' => $model->getIsFilterableInSearch(),
'position' => $model->getPosition()
];
$result['additional_fields'] = [
'is_filterable' => $model->getIsFilterable(),
'is_filterable_in_search' => $model->getIsFilterableInSearch(),
'position' => $model->getPosition()
];
break;
case 'select':
case 'price':
$result['additional_fields'] = [
'is_filterable' => $model->getIsFilterable(),
'is_filterable_in_search' => $model->getIsFilterableInSearch(),
'position' => $model->getPosition(),
'used_for_sort_by' => $model->getUsedForSortBy()
];
$result['additional_fields'] = [
'is_filterable' => $model->getIsFilterable(),
'is_filterable_in_search' => $model->getIsFilterableInSearch(),
'position' => $model->getPosition(),
'used_for_sort_by' => $model->getUsedForSortBy()
];
break;
default:
$result['additional_fields'] = [];
$result['additional_fields'] = [];
break;
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Checkout/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function isMultishippingCheckoutAvailable()
&& (($quote->getItemsSummaryQty() - $quote->getItemVirtualQty()) > 0)
&& ($quote->getItemsSummaryQty() <= $maximunQty)
&& !$quote->hasNominalItems()
;
;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Dataflow/Model/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public function _parseGuiData()
$xml .= ' <var name="method">parse</var>' . $nl;
$xml .= '</action>';
}
//$xml = $interactiveXml.$fileXml.$parseFileXml.$mapXml.$parseDataXml.$entityXml;
//$xml = $interactiveXml.$fileXml.$parseFileXml.$mapXml.$parseDataXml.$entityXml;
} else {
$xml = $entityXml . $parseDataXml . $mapXml . $parseFileXml . $fileXml . $interactiveXml;
}
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Downloadable/Helper/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ protected function _getHandle()

if (is_null($this->_handle)) {
if ($this->_linkType == self::LINK_TYPE_URL) {

/**
* Validate URL
*/
Expand Down
26 changes: 13 additions & 13 deletions app/code/core/Mage/Eav/Model/Attribute/Data/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,19 +333,19 @@ protected function _validateInputRule($value)
}
break;
case 'email':
/**
$this->__("'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded")
$this->__("Invalid type given. String expected")
$this->__("'%value%' appears to be a DNS hostname but contains a dash in an invalid position")
$this->__("'%value%' does not match the expected structure for a DNS hostname")
$this->__("'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'")
$this->__("'%value%' does not appear to be a valid local network name")
$this->__("'%value%' does not appear to be a valid URI hostname")
$this->__("'%value%' appears to be an IP address, but IP addresses are not allowed")
$this->__("'%value%' appears to be a local network name but local network names are not allowed")
$this->__("'%value%' appears to be a DNS hostname but cannot extract TLD part")
$this->__("'%value%' appears to be a DNS hostname but cannot match TLD against known list")
*/
/**
$this->__("'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded")
$this->__("Invalid type given. String expected")
$this->__("'%value%' appears to be a DNS hostname but contains a dash in an invalid position")
$this->__("'%value%' does not match the expected structure for a DNS hostname")
$this->__("'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'")
$this->__("'%value%' does not appear to be a valid local network name")
$this->__("'%value%' does not appear to be a valid URI hostname")
$this->__("'%value%' appears to be an IP address, but IP addresses are not allowed")
$this->__("'%value%' appears to be a local network name but local network names are not allowed")
$this->__("'%value%' appears to be a DNS hostname but cannot extract TLD part")
$this->__("'%value%' appears to be a DNS hostname but cannot match TLD against known list")
*/
$validator = new Zend_Validate_EmailAddress();
$validator->setMessage(
Mage::helper('eav')->__('"%s" invalid type entered.', $label),
Expand Down
8 changes: 4 additions & 4 deletions app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ public function setFilter($attrFilterArray, $attrToDb = null, $bind = null, $joi
];
break;
case 'startsWith':
$attr = [
'attribute' => $keyDB,
'like' => $val . '%'
];
$attr = [
'attribute' => $keyDB,
'like' => $val . '%'
];
break;
case 'fromTo':
$attr = [
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Install/Model/Installer/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ protected function _prepareData()
public function install()
{
try {

/**
* Check if already installed
*/
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Paygate/Model/Authorizenet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ protected function _postRequest(Varien_Object $request)
->setCardType($r[51])
->setRequestedAmount($r[53])
->setBalanceOnCard($r[54])
;
;
} else {
Mage::throwException(
Mage::helper('paygate')->__('Error in payment gateway.')
Expand Down Expand Up @@ -1451,7 +1451,7 @@ private function _clearAssignedData($payment)
->setCcSsIssue(null)
->setCcSsStartMonth(null)
->setCcSsStartYear(null)
;
;
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Payment/Model/Method/Cc.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function assignData($data)
->setCcSsIssue($data->getCcSsIssue())
->setCcSsStartMonth($data->getCcSsStartMonth())
->setCcSsStartYear($data->getCcSsStartYear())
;
;
return $this;
}

Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Paypal/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ private function _matchBnCountryCode($code)
// GB == UK
case 'GB':
return 'UK';
// Australia, Austria, Belgium, Canada, China, France, Germany, Hong Kong, Italy
// Australia, Austria, Belgium, Canada, China, France, Germany, Hong Kong, Italy
case 'AU':
case 'AT':
case 'BE':
Expand All @@ -1673,7 +1673,7 @@ private function _matchBnCountryCode($code)
case 'DE':
case 'HK':
case 'IT':
// Japan, Mexico, Netherlands, Poland, Singapore, Spain, Switzerland, United Kingdom, United States
// Japan, Mexico, Netherlands, Poland, Singapore, Spain, Switzerland, United Kingdom, United States
case 'JP':
case 'MX':
case 'NL':
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Paypal/Model/Express/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public function place($token, $shippingMethodCode = null)
case Mage_Sales_Model_Order::STATE_PENDING_PAYMENT:
// TODO
break;
// regular placement, when everything is ok
// regular placement, when everything is ok
case Mage_Sales_Model_Order::STATE_PROCESSING:
case Mage_Sales_Model_Order::STATE_COMPLETE:
case Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW:
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Paypal/Model/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ protected function _getAvsLabel($value)
return Mage::helper('paypal')->__('Matched whole nine-didgit ZIP (no Address)');
case 'Y':
return Mage::helper('paypal')->__('Yes. Matched Address and five-didgit ZIP');
// Maestro and Solo
// Maestro and Solo
case '0':
return Mage::helper('paypal')->__('All the address information matched');
case '1':
Expand Down Expand Up @@ -614,7 +614,7 @@ protected function _getCvv2Label($value)
return Mage::helper('paypal')->__('N/A. Service not available');
case 'X':
return Mage::helper('paypal')->__('N/A. No response');
// Maestro and Solo
// Maestro and Solo
case '0':
return Mage::helper('paypal')->__('Matched (CVV2)');
case '1':
Expand Down
16 changes: 8 additions & 8 deletions app/code/core/Mage/Paypal/Model/Ipn.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ protected function _processOrder()
$this->_registerDispute();
break;

// handle new adjustment is created
// handle new adjustment is created
case Mage_Paypal_Model_Info::TXN_TYPE_ADJUSTMENT:
$this->_registerAdjustment();
break;

//handle new transaction created
//handle new transaction created
default:
$this->_registerTransaction();
}
Expand Down Expand Up @@ -352,18 +352,18 @@ protected function _registerTransaction()
$this->_registerPaymentCapture(true);
break;

// the holded payment was denied on paypal side
// the holded payment was denied on paypal side
case Mage_Paypal_Model_Info::PAYMENTSTATUS_DENIED:
$this->_registerPaymentDenial();
break;

// customer attempted to pay via bank account, but failed
// customer attempted to pay via bank account, but failed
case Mage_Paypal_Model_Info::PAYMENTSTATUS_FAILED:
// cancel order
$this->_registerPaymentFailure();
break;

// payment was obtained, but money were not captured yet
// payment was obtained, but money were not captured yet
case Mage_Paypal_Model_Info::PAYMENTSTATUS_PENDING:
$this->_registerPaymentPending();
break;
Expand Down Expand Up @@ -815,9 +815,9 @@ protected function _filterPaymentStatus($ipnPaymentStatus)
}
return '';
// documented in NVP, but not documented in IPN:
//Mage_Paypal_Model_Info::PAYMENTSTATUS_NONE
//Mage_Paypal_Model_Info::PAYMENTSTATUS_INPROGRESS
//Mage_Paypal_Model_Info::PAYMENTSTATUS_REFUNDEDPART
//Mage_Paypal_Model_Info::PAYMENTSTATUS_NONE
//Mage_Paypal_Model_Info::PAYMENTSTATUS_INPROGRESS
//Mage_Paypal_Model_Info::PAYMENTSTATUS_REFUNDEDPART
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Paypal/Model/Pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ protected function _importRefundResultToPayment($api, $payment, $canRefundMore)
$payment->setTransactionId($api->getRefundTransactionId())
->setIsTransactionClosed(1) // refund initiated by merchant
->setShouldCloseParentTransaction(!$canRefundMore)
;
;
$this->importPaymentInfo($api, $payment);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/PaypalUk/Model/Direct.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function _importResultToPayment($api, $payment)
$payment->setTransactionId($api->getPaypalTransactionId())->setIsTransactionClosed(0)
->setIsTransactionPending($api->getIsPaymentPending())
->setTransactionAdditionalInfo(Mage_PaypalUk_Model_Pro::TRANSPORT_PAYFLOW_TXN_ID, $api->getTransactionId())
;
;
$payment->setPreparedMessage(Mage::helper('paypaluk')->__('Payflow PNREF: #%s.', $api->getTransactionId()));
$this->_pro->importPaymentInfo($api, $payment);
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Review/Block/Product/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getReviewsSummaryHtml(Mage_Catalog_Model_Product $product, $temp
$reviewContBlock
->assign('count', $this->getReviewsCollection()->getSize())
->toHtml()
;
;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ public function getValueElementChooserUrl()
switch ($this->getAttribute()) {
case 'sku':
case 'category_ids':
$url = 'adminhtml/promo_widget/chooser'
. '/attribute/' . $this->getAttribute();
$url = 'adminhtml/promo_widget/chooser'
. '/attribute/' . $this->getAttribute();
if ($this->getJsFormObject()) {
$url .= '/form/' . $this->getJsFormObject();
}
Expand Down
Loading

0 comments on commit cbfb537

Please sign in to comment.