Skip to content

Commit 3a46d6b

Browse files
authored
ENGCOM-4190: Apply PHP-CS-Fixer "braces" fixes on if and foreach statements #21097
2 parents fcd118c + 088c14e commit 3a46d6b

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

app/code/Magento/Bundle/view/adminhtml/templates/catalog/product/edit/tab/attributes/extend.phtml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ $isElementReadonly = $block->getElement()
2020
->getReadonly();
2121
?>
2222

23-
<?php if (!($attributeCode === 'price' && $block->getCanReadPrice() === false)) { ?>
23+
<?php if (!($attributeCode === 'price' && $block->getCanReadPrice() === false)): ?>
2424
<div class="<?= /* @escapeNotVerified */ $attributeCode ?> "><?= /* @escapeNotVerified */ $elementHtml ?></div>
25-
<?php } ?>
25+
<?php endif; ?>
2626

2727
<?= $block->getExtendedElement($switchAttributeCode)->toHtml() ?>
2828

@@ -43,13 +43,13 @@ $isElementReadonly = $block->getElement()
4343
} else {
4444
if ($attribute) {
4545
<?php if ($attributeCode === 'price' && !$block->getCanEditPrice() && $block->getCanReadPrice()
46-
&& $block->getProduct()->isObjectNew()) { ?>
46+
&& $block->getProduct()->isObjectNew()): ?>
4747
<?php $defaultProductPrice = $block->getDefaultProductPrice() ?: "''"; ?>
4848
$attribute.value = <?= /* @escapeNotVerified */ $defaultProductPrice ?>;
49-
<?php } else { ?>
49+
<?php else: ?>
5050
$attribute.disabled = false;
5151
$attribute.addClassName('required-entry');
52-
<?php } ?>
52+
<?php endif; ?>
5353
}
5454
if ($('dynamic-price-warning')) {
5555
$('dynamic-price-warning').hide();
@@ -58,9 +58,9 @@ $isElementReadonly = $block->getElement()
5858
}
5959

6060
<?php if (!($attributeCode === 'price' && !$block->getCanEditPrice()
61-
&& !$block->getProduct()->isObjectNew())) { ?>
61+
&& !$block->getProduct()->isObjectNew())): ?>
6262
$('<?= /* @escapeNotVerified */ $switchAttributeCode ?>').observe('change', <?= /* @escapeNotVerified */ $switchAttributeCode ?>_change);
63-
<?php } ?>
63+
<?php endif; ?>
6464
Event.observe(window, 'load', function(){
6565
<?= /* @escapeNotVerified */ $switchAttributeCode ?>_change();
6666
});

app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<a href="<?= /* @escapeNotVerified */ $label['link'] ?>"
1818
aria-label="<?= /* @escapeNotVerified */ $label['label'] ?>"
1919
class="swatch-option-link-layered">
20-
<?php if (isset($swatchData['swatches'][$option]['type'])) { ?>
20+
<?php if (isset($swatchData['swatches'][$option]['type'])): ?>
2121
<?php switch ($swatchData['swatches'][$option]['type']) {
2222
case '3':
2323
?>
@@ -32,10 +32,8 @@
3232
<?php break;
3333
case '2':
3434
?>
35-
<?php $swatchThumbPath = $block->getSwatchPath('swatch_thumb',
36-
$swatchData['swatches'][$option]['value']); ?>
37-
<?php $swatchImagePath = $block->getSwatchPath('swatch_image',
38-
$swatchData['swatches'][$option]['value']); ?>
35+
<?php $swatchThumbPath = $block->getSwatchPath('swatch_thumb', $swatchData['swatches'][$option]['value']); ?>
36+
<?php $swatchImagePath = $block->getSwatchPath('swatch_image', $swatchData['swatches'][$option]['value']); ?>
3937
<div class="swatch-option image <?= /* @escapeNotVerified */ $label['custom_style'] ?>"
4038
tabindex="-1"
4139
option-type="2"
@@ -69,7 +67,7 @@
6967
><?= /* @escapeNotVerified */ $swatchData['swatches'][$option]['value'] ?></div>
7068
<?php break;
7169
} ?>
72-
<?php } ?>
70+
<?php endif; ?>
7371
</a>
7472
<?php endforeach; ?>
7573
</div>

app/code/Magento/Ui/view/base/templates/stepswizard.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
<div data-role="steps-wizard-controls" class="steps-wizard-navigation">
1515
<ul class="nav-bar">
16-
<?php foreach ($block->getSteps() as $step) { ?>
16+
<?php foreach ($block->getSteps() as $step): ?>
1717
<li data-role="collapsible" data-bind="css: { 'active': selectedStep() == '<?= /* @escapeNotVerified */ $step->getComponentName() ?>'}">
1818
<a href="#<?= /* @escapeNotVerified */ $step->getComponentName() ?>"
1919
data-bind="click: showSpecificStep">
2020
<?= /* @escapeNotVerified */ $step->getCaption() ?>
2121
</a>
2222
</li>
23-
<?php } ?>
23+
<?php endforeach; ?>
2424
</ul>
2525
<div class="nav-bar-outer-actions">
2626
<div class="action-wrap" data-role="closeBtn">
@@ -45,13 +45,13 @@
4545
</div>
4646
</div>
4747
<div data-role="steps-wizard-tab">
48-
<?php foreach ($block->getSteps() as $step) { ?>
48+
<?php foreach ($block->getSteps() as $step): ?>
4949
<div data-bind="visible: selectedStep() == $element.id, css: {'no-display':false}"
5050
class="content no-display" id="<?= /* @escapeNotVerified */ $step->getComponentName() ?>"
5151
data-role="content">
5252
<?= /* @escapeNotVerified */ $step->getContent() ?>
5353
</div>
54-
<?php } ?>
54+
<?php endforeach; ?>
5555
</div>
5656
</div>
5757

0 commit comments

Comments
 (0)