Skip to content

Commit 1430ea7

Browse files
authored
Merge branch 'main' into tinymce
2 parents b6413d6 + b266126 commit 1430ea7

File tree

196 files changed

+253
-810
lines changed

Some content is hidden

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

196 files changed

+253
-810
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/.all-contributorsrc export-ignore
1010
/.gitattributes export-ignore
1111
/.gitignore export-ignore
12-
/.gitpod.yml export-ignore
1312

1413
/.php-cs-fixer.dist.php export-ignore
1514
/.phpcs.ecg.xml.dist export-ignore

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@
910910
- any-glob-to-any-file: [
911911
.phpunit*,
912912
tests/*,
913+
tests/**/*,
913914
.github/workflows/phpunit.yml
914915
]
915916

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
# TinyMCE library
2727
/js/tinymce
2828

29-
# Add Gitpod online IDE config
30-
# https://github.com/OpenMage/magento-lts/pull/1836
31-
/dev/gitpod/docker-magento
32-
/dev/gitpod/.env
33-
3429
# Add development environment setup files and README
3530
# https://github.com/OpenMage/magento-lts/pull/1012
3631
/dev/openmage/docker-magento

.gitpod.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.phpstan.dist.baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,16 +2535,6 @@ parameters:
25352535
count: 1
25362536
path: app/code/core/Mage/Core/Controller/Front/Action.php
25372537

2538-
-
2539-
message: "#^Call to an undefined method Zend_Controller_Router_Interface\\:\\:addRoute\\(\\)\\.$#"
2540-
count: 1
2541-
path: app/code/core/Mage/Core/Controller/Front/Router.php
2542-
2543-
-
2544-
message: "#^Parameter \\#1 \\$type of static method Mage\\:\\:getBaseUrl\\(\\) expects string, array given\\.$#"
2545-
count: 1
2546-
path: app/code/core/Mage/Core/Controller/Front/Router.php
2547-
25482538
-
25492539
message: "#^Constructor of class Mage_Core_Controller_Varien_Action has an unused parameter \\$invokeArgs\\.$#"
25502540
count: 1

.rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
CodeQuality\Foreach_\UnusedForeachValueToArrayKeysRector::class,
3030
CodeQuality\FuncCall\ChangeArrayPushToArrayAssignRector::class,
3131
CodeQuality\FuncCall\CompactToVariablesRector::class,
32+
CodeQuality\FunctionLike\SimplifyUselessVariableRector::class,
3233
CodeQuality\Identical\SimplifyArraySearchRector::class,
3334
CodeQuality\Identical\SimplifyConditionsRector::class,
3435
CodeQuality\Identical\StrlenZeroToIdenticalEmptyStringRector::class,

app/Mage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ public static function getStoreConfigFlag($path, $store = null)
444444
/**
445445
* Get base URL path by type
446446
*
447-
* @param string $type
447+
* @param Mage_Core_Model_Store::URL_TYPE_* $type
448448
* @param null|bool $secure
449449
* @return string
450450
*/

app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ public function getElementHtml()
6363

6464
$html .= ' <label for="' . $htmlId . '" class="normal">'
6565
. Mage::helper('adminhtml')->__('Use Config Settings') . '</label>';
66-
$html .= '<script type="text/javascript">' . 'toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
67-
. '\').parentNode);' . '</script>';
6866

69-
return $html;
67+
return $html . ('<script type="text/javascript">' . 'toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
68+
. '\').parentNode);' . '</script>');
7069
}
7170
}

app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ public function getElementHtml()
6161
$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
6262
$html .= ' <label for="' . $htmlId . '" class="normal">'
6363
. Mage::helper('adminhtml')->__('Use All Available Attributes') . '</label>';
64-
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
65-
. '\').parentNode);</script>';
6664

67-
return $html;
65+
return $html . ('<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
66+
. '\').parentNode);</script>');
6867
}
6968
}

app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ public function getElementHtml()
6262
$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
6363
$html .= ' <label for="' . $htmlId . '" class="normal">'
6464
. Mage::helper('adminhtml')->__('Use Config Settings') . '</label>';
65-
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
66-
. '\').parentNode);</script>';
6765

68-
return $html;
66+
return $html . ('<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId
67+
. '\').parentNode);</script>');
6968
}
7069
}

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ protected function _toHtml()
8383
}
8484

8585
$html = parent::_toHtml();
86-
$html .= Mage::helper('adminhtml/js')->getScript(
86+
87+
return $html . Mage::helper('adminhtml/js')->getScript(
8788
"var {$this->getJsObjectName()} = new Product.Attributes('{$this->getId()}');\n"
8889
. "{$this->getJsObjectName()}.setConfig(" . Mage::helper('core')->jsonEncode($this->getConfig()->getData()) . ");\n"
8990
);
90-
91-
return $html;
9291
}
9392

9493
/**

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,8 @@ public function getCheckboxScopeHtml($id, $name, $checked = true, $selectId = '-
325325
$selectIdHtml . $name . '_use_default" class="product-option-scope-checkbox" name="' .
326326
$this->getFieldName() . '[' . $id . ']' . $selectNameHtml . '[scope][' . $name . ']" value="1" ' .
327327
$checkedHtml . '/>';
328-
$checkbox .= '<label class="normal" for="' . $this->getFieldId() . '_' . $id . '_' .
329-
$selectIdHtml . $name . '_use_default">' . $this->__('Use Default Value') . '</label>';
330-
return $checkbox;
328+
return $checkbox . ('<label class="normal" for="' . $this->getFieldId() . '_' . $id . '_' .
329+
$selectIdHtml . $name . '_use_default">' . $this->__('Use Default Value') . '</label>');
331330
}
332331

333332
public function getPriceValue($value, $type)

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
6464
$html .= $field->toHtml();
6565
}
6666

67-
$html .= $this->_getFooterHtml($element);
68-
69-
return $html;
67+
return $html . $this->_getFooterHtml($element);
7068
}
7169

7270
protected function _getHeaderHtml($element)
@@ -83,9 +81,8 @@ protected function _getHeaderHtml($element)
8381
if (!$default) {
8482
$html .= '<colgroup class="use-default" />';
8583
}
86-
$html .= '<tbody>';
8784

88-
return $html;
85+
return $html . '<tbody>';
8986
}
9087

9188
protected function _getFooterHtml($element)

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ public function getElementHtml()
3838
. '<option value="0">' . $this->getModeLabels('all') . '</option>'
3939
. '<option value="1" ' . ($this->getValue() == null ? '' : 'selected') . '>' . $this->getModeLabels('custom') . '</option>'
4040
. '</select><br /><br />';
41-
42-
$html .= parent::getElementHtml();
43-
return $html;
41+
return $html . parent::getElementHtml();
4442
}
4543

4644
/**

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ public function getElementHtml()
4242
$html .= '<input id="' . $htmlId . '" name="product[' . $htmlId . ']" ' . $disabled . ' value="1" ' . $checked;
4343
$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
4444
$html .= ' <label for="' . $htmlId . '">' . Mage::helper('adminhtml')->__('Use Config Settings') . '</label>';
45-
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId . '\').parentNode);</script>';
4645

47-
return $html;
46+
return $html . ('<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId . '\').parentNode);</script>');
4847
}
4948

5049
/**

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ function (node, e) {
144144
{jsObject}.categoryName = node.attributes.id != "none" ? node.text : false;
145145
}
146146
';
147-
$js = str_replace('{jsObject}', $this->getJsObjectName(), $js);
148-
return $js;
147+
return str_replace('{jsObject}', $this->getJsObjectName(), $js);
149148
}
150149

151150
/**

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public function getHeaderText()
8585
public function getFormHtml()
8686
{
8787
$html = parent::getFormHtml();
88-
$html .= $this->getLayout()->createBlock('adminhtml/catalog_product_composite_configure')->toHtml();
89-
return $html;
88+
return $html . $this->getLayout()->createBlock('adminhtml/catalog_product_composite_configure')->toHtml();
9089
}
9190

9291
/**

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ public function render(Varien_Data_Form_Element_Abstract $element)
3333
$html .= '<td class="label">' . $element->getLabelHtml() . '</td>';
3434
$html .= '<td class="value">' . $element->getElementHtml() . ' ' . $this->_getScriptHtml($element) . '</td>';
3535
$html .= '</tr>' . "\n";
36-
$html .= '<tr>';
3736

38-
return $html;
37+
return $html . '<tr>';
3938
}
4039

4140
/**

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
5252
$html .= '<label for="account-send-pass">'
5353
. Mage::helper('customer')->__('Email Link to Set Password')
5454
. '</label></td>';
55-
$html .= '</tr>' . "\n";
5655

57-
return $html;
56+
return $html . ('</tr>' . "\n");
5857
}
5958
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function render(Varien_Data_Form_Element_Abstract $element)
6868
$selectId . '", ' . Mage::helper('directory')->getRegionJsonByStore($quoteStoreId) . ');' . "\n";
6969
$html .= '</script>' . "\n";
7070

71-
$html .= '</td></tr>' . "\n";
72-
73-
return $html;
71+
return $html . ('</td></tr>' . "\n");
7472
}
7573
}

app/code/core/Mage/Adminhtml/Block/Page/Menu.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,7 @@ protected function _checkAcl($resource)
234234
*/
235235
protected function _afterToHtml($html)
236236
{
237-
$html = preg_replace_callback('#' . Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME . '/\$([^\/].*)/([^\$].*)\$#', [$this, '_callbackSecretKey'], $html);
238-
239-
return $html;
237+
return preg_replace_callback('#' . Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME . '/\$([^\/].*)/([^\$].*)\$#', [$this, '_callbackSecretKey'], $html);
240238
}
241239

242240
/**
@@ -281,9 +279,8 @@ public function getMenuLevel($menu, $level = 0)
281279
}
282280
$html .= '</li>' . PHP_EOL;
283281
}
284-
$html .= '</ul>' . PHP_EOL;
285282

286-
return $html;
283+
return $html . ('</ul>' . PHP_EOL);
287284
}
288285

289286
/**

app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
3939
$element->getNote()
4040
);
4141
$html = '<td class="label">&nbsp;</td>';
42-
$html .= '<td class="value">' . $elementHtml . '</td>';
4342

44-
return $html;
43+
return $html . ('<td class="value">' . $elementHtml . '</td>');
4544
}
4645
}

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ public function getHeaderHtml()
9696
public function getFormHtml()
9797
{
9898
$html = parent::getFormHtml();
99-
$html .= $this->getLayout()->createBlock('adminhtml/catalog_product_composite_configure')->toHtml();
100-
return $html;
99+
return $html . $this->getLayout()->createBlock('adminhtml/catalog_product_composite_configure')->toHtml();
101100
}
102101

103102
/**

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public function getButtonsHtml()
5555
'onclick' => 'order.setCustomerIsGuest()',
5656
'class' => 'add',
5757
];
58-
$html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
5958

60-
return $html;
59+
return $html . $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
6160
}
6261
}

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ protected function _toHtml()
4646
$out .= Mage::helper('sales')->__('Create New Order');
4747
}
4848
$out = $this->escapeHtml($out);
49-
$out = '<h3 class="icon-head head-sales-order">' . $out . '</h3>';
50-
return $out;
49+
return '<h3 class="icon-head head-sales-order">' . $out . '</h3>';
5150
}
5251
}

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function render(Varien_Object $row)
6060
if ($isInactive) {
6161
$html .= 'disabled="disabled" ';
6262
}
63-
$html .= 'class="input-text ' . $this->getColumn()->getInlineCss() . ($isInactive ? ' input-inactive' : '') . '" />';
64-
return $html;
63+
return $html . ('class="input-text ' . $this->getColumn()->getInlineCss() . ($isInactive ? ' input-inactive' : '') . '" />');
6564
}
6665
}

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public function includeTax()
3232
public function getTotalExclTax()
3333
{
3434
$excl = $this->getTotal()->getAddress()->getGrandTotal() - $this->getTotal()->getAddress()->getTaxAmount();
35-
$excl = max($excl, 0);
36-
return $excl;
35+
return max($excl, 0);
3736
}
3837
}

app/code/core/Mage/Adminhtml/Block/System/Config/Form.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,7 @@ protected function _afterToHtml($html)
543543
if ($this->_getDependence()) {
544544
$html .= $this->_getDependence()->toHtml();
545545
}
546-
$html = parent::_afterToHtml($html);
547-
return $html;
546+
return parent::_afterToHtml($html);
548547
}
549548

550549
/**

app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_File extends Varien_Data_For
3030
public function getElementHtml()
3131
{
3232
$html = parent::getElementHtml();
33-
$html .= $this->_getDeleteCheckbox();
34-
return $html;
33+
return $html . $this->_getDeleteCheckbox();
3534
}
3635

3736
/**

app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ function checkConditionName(event)
5353
</script>
5454
EndHTML;
5555

56-
$html .= parent::getElementHtml();
57-
58-
return $html;
56+
return $html . parent::getElementHtml();
5957
}
6058
}

app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
3636
$html .= $field->toHtml();
3737
}
3838

39-
$html .= $this->_getFooterHtml($element);
40-
41-
return $html;
39+
return $html . $this->_getFooterHtml($element);
4240
}
4341

4442
/**
@@ -69,9 +67,8 @@ protected function _getHeaderHtml($element)
6967
if ($this->getRequest()->getParam('website') || $this->getRequest()->getParam('store')) {
7068
$html .= '<colgroup class="use-default" />';
7169
}
72-
$html .= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
7370

74-
return $html;
71+
return $html . '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
7572
}
7673

7774
/**

0 commit comments

Comments
 (0)