Skip to content

Commit b266126

Browse files
authored
1 parent 53e2375 commit b266126

File tree

187 files changed

+251
-531
lines changed

Some content is hidden

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

187 files changed

+251
-531
lines changed

.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

.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/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
/**

0 commit comments

Comments
 (0)