Skip to content

Commit 76946a6

Browse files
committed
Static test fix attempt 2
1 parent c4ffa89 commit 76946a6

File tree

2 files changed

+26
-24
lines changed
  • app/code/Magento

2 files changed

+26
-24
lines changed

app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,27 @@ $viewModel = $block->getData('product_layer_view_model');
1313
?>
1414

1515
<ol class="items">
16-
<?php foreach ($filterItems as $filterItem) :?>
16+
<?php foreach ($filterItems as $filterItem): ?>
1717
<li class="item">
18-
<?php if ($filterItem->getCount() > 0) :?>
18+
<?php if ($filterItem->getCount() > 0): ?>
1919
<a href="<?= $block->escapeUrl($filterItem->getUrl()) ?>" rel="nofollow">
2020
<?= /* @noEscape */ $filterItem->getLabel() ?>
21-
<?php if ($viewModel->shouldDisplayProductCountOnLayer()) : ?>
22-
<span class="count"><?= /* @noEscape */ (int)$filterItem->getCount() ?><span class="filter-count-label">
23-
<?php if ($filterItem->getCount() == 1) :
21+
<?php if ($viewModel->shouldDisplayProductCountOnLayer()): ?>
22+
<span class="count"><?= /* @noEscape */ (int)$filterItem->getCount() ?>
23+
<span class="filter-count-label">
24+
<?php if ($filterItem->getCount() == 1):
2425
?> <?= $block->escapeHtml(__('item')) ?><?php
25-
else :
26+
else:
2627
?> <?= $block->escapeHtml(__('item')) ?><?php
2728
endif;?></span></span>
2829
<?php endif; ?>
2930
</a>
30-
<?php else :?>
31+
<?php else: ?>
3132
<?= /* @noEscape */ $filterItem->getLabel() ?>
32-
<?php if ($viewModel->shouldDisplayProductCountOnLayer()) : ?>
33-
<span class="count"><?= /* @noEscape */ (int)$filterItem->getCount() ?><span class="filter-count-label">
34-
<?php if ($filterItem->getCount() == 1) :
33+
<?php if ($viewModel->shouldDisplayProductCountOnLayer()): ?>
34+
<span class="count"><?= /* @noEscape */ (int)$filterItem->getCount() ?>
35+
<span class="filter-count-label">
36+
<?php if ($filterItem->getCount() == 1):
3537
?><?= $block->escapeHtml(__('items')) ?><?php
3638
else:
3739
?><?= $block->escapeHtml(__('items')) ?><?php

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
attribute-code="<?= $block->escapeHtmlAttr($swatchData['attribute_code']) ?>"
1515
attribute-id="<?= $block->escapeHtmlAttr($swatchData['attribute_id']) ?>">
1616
<div class="swatch-attribute-options clearfix">
17-
<?php foreach ($swatchData['options'] as $option => $label) :?>
17+
<?php foreach ($swatchData['options'] as $option => $label): ?>
1818
<a href="<?= $block->escapeUrl($label['link']) ?>" rel="nofollow"
1919
aria-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
2020
class="swatch-option-link-layered">
21-
<?php if (isset($swatchData['swatches'][$option]['type'])) :?>
21+
<?php if (isset($swatchData['swatches'][$option]['type'])): ?>
2222
<?php switch ($swatchData['swatches'][$option]['type']) {
2323
case '3':
2424
?>
@@ -34,14 +34,14 @@
3434
case '2':
3535
?>
3636
<?php $swatchThumbPath = $block->getSwatchPath(
37-
'swatch_thumb',
38-
$swatchData['swatches'][$option]['value']
39-
); ?>
37+
'swatch_thumb',
38+
$swatchData['swatches'][$option]['value']
39+
); ?>
4040
<?php $swatchImagePath = $block->getSwatchPath(
41-
'swatch_image',
42-
$swatchData['swatches'][$option]['value']
41+
'swatch_image',
42+
$swatchData['swatches'][$option]['value']
4343
);
44-
$escapedUrl = $block->escapeUrl($swatchImagePath);
44+
$escapedUrl = $block->escapeUrl($swatchImagePath);
4545
?>
4646
<div class="swatch-option image <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
4747
tabindex="-1"
@@ -50,8 +50,8 @@
5050
option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
5151
option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
5252
option-tooltip-value=""
53-
style="background: url(<?=
54-
$escapedUrl
53+
style="background: url(<?=
54+
/* @noEscape */ $escapedUrl
5555
?>) no-repeat center; background-size: initial;">
5656
</div>
5757
<?php break;
@@ -64,11 +64,11 @@
6464
option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
6565
option-tooltip-thumb=""
6666
option-tooltip-value="<?= $block->escapeHtmlAttr(
67-
$swatchData['swatches'][$option]['value']
68-
) ?>"
67+
$swatchData['swatches'][$option]['value']
68+
) ?>"
6969
style="background: <?= $block->escapeHtmlAttr(
70-
$swatchData['swatches'][$option]['value']
71-
) ?> no-repeat center; background-size: initial;"></div>
70+
$swatchData['swatches'][$option]['value']
71+
) ?> no-repeat center; background-size: initial;"></div>
7272
<?php break;
7373
case '0':
7474
default:

0 commit comments

Comments
 (0)