Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply PHP-CS-Fixer "braces" fixes on if and foreach statements #21097

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ $isElementReadonly = $block->getElement()
->getReadonly();
?>

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

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

Expand All @@ -43,13 +43,13 @@ $isElementReadonly = $block->getElement()
} else {
if ($attribute) {
<?php if ($attributeCode === 'price' && !$block->getCanEditPrice() && $block->getCanReadPrice()
&& $block->getProduct()->isObjectNew()) { ?>
&& $block->getProduct()->isObjectNew()): ?>
<?php $defaultProductPrice = $block->getDefaultProductPrice() ?: "''"; ?>
$attribute.value = <?= /* @escapeNotVerified */ $defaultProductPrice ?>;
<?php } else { ?>
<?php else: ?>
$attribute.disabled = false;
$attribute.addClassName('required-entry');
<?php } ?>
<?php endif; ?>
}
if ($('dynamic-price-warning')) {
$('dynamic-price-warning').hide();
Expand All @@ -58,9 +58,9 @@ $isElementReadonly = $block->getElement()
}

<?php if (!($attributeCode === 'price' && !$block->getCanEditPrice()
&& !$block->getProduct()->isObjectNew())) { ?>
&& !$block->getProduct()->isObjectNew())): ?>
$('<?= /* @escapeNotVerified */ $switchAttributeCode ?>').observe('change', <?= /* @escapeNotVerified */ $switchAttributeCode ?>_change);
<?php } ?>
<?php endif; ?>
Event.observe(window, 'load', function(){
<?= /* @escapeNotVerified */ $switchAttributeCode ?>_change();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<a href="<?= /* @escapeNotVerified */ $label['link'] ?>"
aria-label="<?= /* @escapeNotVerified */ $label['label'] ?>"
class="swatch-option-link-layered">
<?php if (isset($swatchData['swatches'][$option]['type'])) { ?>
<?php if (isset($swatchData['swatches'][$option]['type'])): ?>
<?php switch ($swatchData['swatches'][$option]['type']) {
case '3':
?>
Expand All @@ -32,10 +32,8 @@
<?php break;
case '2':
?>
<?php $swatchThumbPath = $block->getSwatchPath('swatch_thumb',
$swatchData['swatches'][$option]['value']); ?>
<?php $swatchImagePath = $block->getSwatchPath('swatch_image',
$swatchData['swatches'][$option]['value']); ?>
<?php $swatchThumbPath = $block->getSwatchPath('swatch_thumb', $swatchData['swatches'][$option]['value']); ?>
<?php $swatchImagePath = $block->getSwatchPath('swatch_image', $swatchData['swatches'][$option]['value']); ?>
<div class="swatch-option image <?= /* @escapeNotVerified */ $label['custom_style'] ?>"
tabindex="-1"
option-type="2"
Expand Down Expand Up @@ -69,7 +67,7 @@
><?= /* @escapeNotVerified */ $swatchData['swatches'][$option]['value'] ?></div>
<?php break;
} ?>
<?php } ?>
<?php endif; ?>
</a>
<?php endforeach; ?>
</div>
Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Ui/view/base/templates/stepswizard.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

<div data-role="steps-wizard-controls" class="steps-wizard-navigation">
<ul class="nav-bar">
<?php foreach ($block->getSteps() as $step) { ?>
<?php foreach ($block->getSteps() as $step): ?>
<li data-role="collapsible" data-bind="css: { 'active': selectedStep() == '<?= /* @escapeNotVerified */ $step->getComponentName() ?>'}">
<a href="#<?= /* @escapeNotVerified */ $step->getComponentName() ?>"
data-bind="click: showSpecificStep">
<?= /* @escapeNotVerified */ $step->getCaption() ?>
</a>
</li>
<?php } ?>
<?php endforeach; ?>
</ul>
<div class="nav-bar-outer-actions">
<div class="action-wrap" data-role="closeBtn">
Expand All @@ -45,13 +45,13 @@
</div>
</div>
<div data-role="steps-wizard-tab">
<?php foreach ($block->getSteps() as $step) { ?>
<?php foreach ($block->getSteps() as $step): ?>
<div data-bind="visible: selectedStep() == $element.id, css: {'no-display':false}"
class="content no-display" id="<?= /* @escapeNotVerified */ $step->getComponentName() ?>"
data-role="content">
<?= /* @escapeNotVerified */ $step->getContent() ?>
</div>
<?php } ?>
<?php endforeach; ?>
</div>
</div>

Expand Down