Skip to content

Commit 1a996ff

Browse files
authored
1 parent 5af5f43 commit 1a996ff

File tree

167 files changed

+663
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+663
-665
lines changed

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
'no_empty_phpdoc' => true,
1717
// PHP84: Adds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.
1818
'nullable_type_declaration_for_default_null_value' => true,
19+
// Operators - when multiline - must always be at the beginning or at the end of the line.
20+
'operator_linebreak' => true,
1921
// Calls to PHPUnit\Framework\TestCase static methods must all be of the same type, either $this->, self:: or static::
2022
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
2123
// PHPDoc annotation descriptions should not be a sentence.

app/Mage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ public static function log($message, $level = null, $file = '', $forceLog = fals
902902
return;
903903
}
904904

905-
$file = empty($file) ?
906-
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
905+
$file = empty($file)
906+
? (string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
907907

908908
try {
909909
if (!isset($loggers[$file])) {

app/code/core/Mage/Admin/Model/Redirectpolicy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Mage_Admin_Model_Redirectpolicy
2424
*/
2525
public function __construct($parameters = [])
2626
{
27-
$this->_urlModel = (!empty($parameters['urlModel'])) ?
28-
$parameters['urlModel'] : Mage::getModel('adminhtml/url');
27+
$this->_urlModel = (!empty($parameters['urlModel']))
28+
? $parameters['urlModel'] : Mage::getModel('adminhtml/url');
2929
}
3030

3131
/**
@@ -47,7 +47,7 @@ public function getRedirectUrl(
4747
&& $request->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME)) ? 1 : 0;
4848
$countGetParams = count($request->getUserParams()) + count($request->getQuery());
4949

50-
return ($countGetParams > $countRequiredParams) ?
51-
$this->_urlModel->getUrl($user->getStartupPageUrl()) : $alternativeUrl;
50+
return ($countGetParams > $countRequiredParams)
51+
? $this->_urlModel->getUrl($user->getStartupPageUrl()) : $alternativeUrl;
5252
}
5353
}

app/code/core/Mage/Admin/Model/Session.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ class Mage_Admin_Model_Session extends Mage_Core_Model_Session_Abstract
7474
*/
7575
public function __construct($parameters = [])
7676
{
77-
$this->_urlPolicy = (!empty($parameters['redirectPolicy'])) ?
78-
$parameters['redirectPolicy'] : Mage::getModel('admin/redirectpolicy');
77+
$this->_urlPolicy = (!empty($parameters['redirectPolicy']))
78+
? $parameters['redirectPolicy'] : Mage::getModel('admin/redirectpolicy');
7979

80-
$this->_response = (!empty($parameters['response'])) ?
81-
$parameters['response'] : new Mage_Core_Controller_Response_Http();
80+
$this->_response = (!empty($parameters['response']))
81+
? $parameters['response'] : new Mage_Core_Controller_Response_Http();
8282

83-
$this->_factory = (!empty($parameters['factory'])) ?
84-
$parameters['factory'] : Mage::getModel('core/factory');
83+
$this->_factory = (!empty($parameters['factory']))
84+
? $parameters['factory'] : Mage::getModel('core/factory');
8585

8686
$this->init('admin');
8787
$this->logoutIndirect();

app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function usedDefault()
8484

8585
if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {
8686
return true;
87-
} elseif ($this->getElement()->getValue() == $defaultValue &&
88-
$this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()
87+
} elseif ($this->getElement()->getValue() == $defaultValue
88+
&& $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()
8989
) {
9090
return false;
9191
}

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ public function getTemplatesHtml()
186186
->setCanReadPrice($canReadPrice)
187187
->setCanEditPrice($canEditPrice);
188188

189-
return $this->getChildHtml('text_option_type') . "\n" .
190-
$this->getChildHtml('file_option_type') . "\n" .
191-
$this->getChildHtml('select_option_type') . "\n" .
192-
$this->getChildHtml('date_option_type');
189+
return $this->getChildHtml('text_option_type') . "\n"
190+
. $this->getChildHtml('file_option_type') . "\n"
191+
. $this->getChildHtml('select_option_type') . "\n"
192+
. $this->getChildHtml('date_option_type');
193193
}
194194

195195
public function getOptionValues()
@@ -274,8 +274,8 @@ public function getOptionValues()
274274
$value['file_extension'] = $this->escapeHtml($option->getFileExtension());
275275
$value['image_size_x'] = $option->getImageSizeX();
276276
$value['image_size_y'] = $option->getImageSizeY();
277-
if ($this->getProduct()->getStoreId() != '0' &&
278-
$scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE
277+
if ($this->getProduct()->getStoreId() != '0'
278+
&& $scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE
279279
) {
280280
$value['checkboxScopePrice'] = $this->getCheckboxScopeHtml(
281281
$option->getOptionId(),
@@ -318,12 +318,12 @@ public function getCheckboxScopeHtml($id, $name, $checked = true, $selectId = '-
318318
$selectIdHtml = 'select_' . $selectId . '_';
319319
}
320320

321-
$checkbox = '<input type="checkbox" id="' . $this->getFieldId() . '_' . $id . '_' .
322-
$selectIdHtml . $name . '_use_default" class="product-option-scope-checkbox" name="' .
323-
$this->getFieldName() . '[' . $id . ']' . $selectNameHtml . '[scope][' . $name . ']" value="1" ' .
324-
$checkedHtml . '/>';
325-
return $checkbox . ('<label class="normal" for="' . $this->getFieldId() . '_' . $id . '_' .
326-
$selectIdHtml . $name . '_use_default">' . $this->__('Use Default Value') . '</label>');
321+
$checkbox = '<input type="checkbox" id="' . $this->getFieldId() . '_' . $id . '_'
322+
. $selectIdHtml . $name . '_use_default" class="product-option-scope-checkbox" name="'
323+
. $this->getFieldName() . '[' . $id . ']' . $selectNameHtml . '[scope][' . $name . ']" value="1" '
324+
. $checkedHtml . '/>';
325+
return $checkbox . ('<label class="normal" for="' . $this->getFieldId() . '_' . $id . '_'
326+
. $selectIdHtml . $name . '_use_default">' . $this->__('Use Default Value') . '</label>');
327327
}
328328

329329
public function getPriceValue($value, $type)

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function isAttributesConfigurationReadonly()
6464
*/
6565
public function isAttributesPricesReadonly()
6666
{
67-
return $this->_getProduct()->getAttributesConfigurationReadonly() ||
68-
(Mage::helper('catalog')->isPriceGlobal() && $this->isReadonly());
67+
return $this->_getProduct()->getAttributesConfigurationReadonly()
68+
|| (Mage::helper('catalog')->isPriceGlobal() && $this->isReadonly());
6969
}
7070

7171
/**

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Renderer_I
2222
public function render(Varien_Object $row)
2323
{
2424
$inStock = $this->_getValue($row);
25-
return $inStock ?
26-
Mage::helper('catalog')->__('In Stock')
25+
return $inStock
26+
? Mage::helper('catalog')->__('In Stock')
2727
: Mage::helper('catalog')->__('Out of Stock');
2828
}
2929
}

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ protected function _prepareColumns()
278278
],
279279
);
280280

281-
if ($this->isModuleEnabled('Mage_Rss', 'catalog') &&
282-
Mage::helper('rss')->isRssAdminCatalogNotifyStockEnabled()
281+
if ($this->isModuleEnabled('Mage_Rss', 'catalog')
282+
&& Mage::helper('rss')->isRssAdminCatalogNotifyStockEnabled()
283283
) {
284284
$this->addRssList('rss/catalog/notifystock', Mage::helper('catalog')->__('Notify Low Stock RSS'));
285285
}

app/code/core/Mage/Adminhtml/Block/Customer/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function __construct()
2020
$this->_objectId = 'id';
2121
$this->_controller = 'customer';
2222

23-
if ($this->getCustomerId() &&
24-
Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create')
23+
if ($this->getCustomerId()
24+
&& Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create')
2525
) {
2626
$this->_addButton('order', [
2727
'label' => Mage::helper('customer')->__('Create Order'),

0 commit comments

Comments
 (0)