Skip to content

Commit f04ef67

Browse files
authored
rector: added template files (#4765)
1 parent f5f27ea commit f04ef67

File tree

29 files changed

+34
-33
lines changed

29 files changed

+34
-33
lines changed

.rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
try {
2323
return RectorConfig::configure()
24+
->withFileExtensions(['php', 'phtml'])
2425
->withCache(
2526
cacheDirectory: '.rector.result.cache',
2627
cacheClass: FileCacheStorage::class,

app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?php $_selections = $_option->getSelections(); ?>
2020
<?php $_default = $_option->getDefaultSelection(); ?>
2121
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
22-
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
22+
<?php [$_defaultQty, $_canChangeQty] = $this->_getDefaultValues(); ?>
2323

2424
<dt>
2525
<span class="qty-holder">

app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?php $_selections = $_option->getSelections(); ?>
2020
<?php $_default = $_option->getDefaultSelection(); ?>
2121
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
22-
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
22+
<?php [$_defaultQty, $_canChangeQty] = $this->_getDefaultValues(); ?>
2323

2424
<dt>
2525
<span class="qty-holder">

app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/file.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<?php $_fieldNameAction = $_fileName . '_action'; ?>
2222
<?php $_fieldValueAction = $_fileExists ? 'save_old' : 'save_new'; ?>
2323
<?php $_fileNamed = $_fileName . '_name'; ?>
24-
<?php $_rand = rand(); ?>
24+
<?php $_rand = random_int(0, mt_getrandmax()); ?>
2525

2626
<script type="text/javascript">
2727
//<![CDATA[

app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<th><?php echo Mage::helper('catalog')->__('Label') ?></th>
4242
<th><?php echo Mage::helper('catalog')->__('Sort Order') ?></th>
4343
<?php foreach ($this->getImageTypes() as $typeId => $type): ?>
44-
<th><?php echo $this->escapeHtml($type['label'], array('br')); ?></th>
44+
<th><?php echo $this->escapeHtml($type['label'], ['br']); ?></th>
4545
<?php endforeach ?>
4646
<th><?php echo Mage::helper('catalog')->__('Exclude') ?></th>
4747
<th class="last"><?php echo Mage::helper('catalog')->__('Remove') ?></th>

app/design/adminhtml/default/default/template/system/currency/rate/matrix.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ $_rates = ( $_newRates ) ? $_newRates : $_oldRates;
4040
<?php if( ++$_j == 1 ): ?>
4141
<td class="a-right"><strong><?php echo $this->escapeHtml($_currencyCode) ?></strong></td>
4242
<td class="a-right">
43-
<input type="text" name="rate[<?php echo $this->escapeHtml($_currencyCode) ?>][<?php echo $this->escapeHtml($_rate) ?>]" value="<?php echo ( $_currencyCode == $_rate ) ? '1.0000' : ($_value>0 ? $_value : (isset($_oldRates[$_currencyCode][$_rate]) ? $_oldRates[$_currencyCode][$_rate] : '')) ?>" <?php echo ( $_currencyCode == $_rate ) ? 'class="input-text input-text-disabled" readonly="true"' : 'class="input-text"' ?> />
43+
<input type="text" name="rate[<?php echo $this->escapeHtml($_currencyCode) ?>][<?php echo $this->escapeHtml($_rate) ?>]" value="<?php echo ( $_currencyCode == $_rate ) ? '1.0000' : ($_value>0 ? $_value : ($_oldRates[$_currencyCode][$_rate] ?? '')) ?>" <?php echo ( $_currencyCode == $_rate ) ? 'class="input-text input-text-disabled" readonly="true"' : 'class="input-text"' ?> />
4444
<?php if( isset($_newRates) && $_currencyCode != $_rate && isset($_oldRates[$_currencyCode][$_rate]) ): ?>
4545
<br /><span class="old-rate"><?php echo $this->__('Old rate:') ?> <?php echo $_oldRates[$_currencyCode][$_rate] ?></span>
4646
<?php endif ?>
4747
</td>
4848
<?php else: ?>
4949
<td class="a-right">
50-
<input type="text" name="rate[<?php echo $this->escapeHtml($_currencyCode) ?>][<?php echo $this->escapeHtml($_rate) ?>]" value="<?php echo ( $_currencyCode == $_rate ) ? '1.0000' : ($_value>0 ? $_value : (isset($_oldRates[$_currencyCode][$_rate]) ? $_oldRates[$_currencyCode][$_rate] : '')) ?>" <?php echo ( $_currencyCode == $_rate ) ? 'class="input-text input-text-disabled" readonly="true"' : 'class="input-text"' ?> />
50+
<input type="text" name="rate[<?php echo $this->escapeHtml($_currencyCode) ?>][<?php echo $this->escapeHtml($_rate) ?>]" value="<?php echo ( $_currencyCode == $_rate ) ? '1.0000' : ($_value>0 ? $_value : ($_oldRates[$_currencyCode][$_rate] ?? '')) ?>" <?php echo ( $_currencyCode == $_rate ) ? 'class="input-text input-text-disabled" readonly="true"' : 'class="input-text"' ?> />
5151
<?php if( isset($_newRates) && $_currencyCode != $_rate && isset($_oldRates[$_currencyCode][$_rate]) ): ?>
5252
<br /><span class="old-rate"><?php echo $this->__('Old rate:') ?> <?php echo $_oldRates[$_currencyCode][$_rate] ?></span>
5353
<?php endif ?>

app/design/frontend/base/default/template/bundle/catalog/product/price.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ $_taxHelper = $this->helper('tax');
3232
$_product = $this->getProduct();
3333
$_priceModel = $_product->getPriceModel();
3434

35-
list($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);
36-
list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);
35+
[$_minimalPriceTax, $_maximalPriceTax] = $_priceModel->getTotalPrices($_product, null, null, false);
36+
[$_minimalPriceInclTax, $_maximalPriceInclTax] = $_priceModel->getTotalPrices($_product, null, true, false);
3737

3838
$_weeeTaxAmount = 0;
3939
?>
@@ -117,7 +117,7 @@ if ($_product->getPriceType() == 1) {
117117
<?php endif ?>
118118
</p>
119119
<?php else: ?>
120-
<?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
120+
<?php if ($_minimalPriceTax != $_maximalPriceTax): ?>
121121
<p class="price-from">
122122
<span class="price-label"><?php echo $this->__('From') ?>:</span>
123123
<?php if ($this->displayBothPrices()): ?>

app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?php $_option = $this->getOption(); ?>
2020
<?php $_selections = $_option->getSelections(); ?>
2121
<?php $_default = $_option->getDefaultSelection(); ?>
22-
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
22+
<?php [$_defaultQty, $_canChangeQty] = $this->_getDefaultValues(); ?>
2323
<?php $tierPriceHtml = ''; ?>
2424

2525
<dt>

app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?php $_option = $this->getOption(); ?>
2020
<?php $_selections = $_option->getSelections(); ?>
2121
<?php $_default = $_option->getDefaultSelection(); ?>
22-
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
22+
<?php [$_defaultQty, $_canChangeQty] = $this->_getDefaultValues(); ?>
2323
<?php $tierPriceHtml = ''; ?>
2424

2525
<dt>

app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
?>
2525

2626
<?php $_product = $this->getProduct() ?>
27-
<?php list($_minimalPrice, $_maximalPrice) = $_product->getPriceModel()->getPrices($_product) ?>
27+
<?php [$_minimalPrice, $_maximalPrice] = $_product->getPriceModel()->getPrices($_product) ?>
2828
<?php $_id = $_product->getId() ?>
2929

3030
<?php
@@ -122,7 +122,7 @@ if ($_product->getPriceType() == 1) {
122122
<?php endif ?>
123123
</p>
124124
<?php else: ?>
125-
<?php if ($_minimalPrice <> $_maximalPrice): ?>
125+
<?php if ($_minimalPrice != $_maximalPrice): ?>
126126
<p class="price-from">
127127
<span class="price-label"><?php echo $this->__('From') ?>:</span>
128128
<?php if ($this->helper('tax')->displayBothPrices()): ?>

0 commit comments

Comments
 (0)