Skip to content

Commit

Permalink
Apply PHP-CS-Fixer braces fixes on if and foreach statements
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshsuhagiya committed Feb 9, 2019
1 parent 00fb2aa commit e0fb77e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
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

0 comments on commit e0fb77e

Please sign in to comment.