Skip to content

Commit 146804f

Browse files
committed
Merge remote-tracking branch 'mpi/PR-2019-12-06' into PR-2019-12-06
2 parents 4a2995d + db54fe8 commit 146804f

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
88
// phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect
9+
// phpcs:disable Generic.Files.LineLength
10+
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
911

1012
/* @var $block \Magento\Catalog\Block\Product\AbstractProduct */
1113
?>
@@ -156,39 +158,39 @@ switch ($type = $block->getType()) {
156158
}
157159
?>
158160

159-
<?php if ($exist) :?>
161+
<?php if ($exist):?>
160162

161-
<?php if ($type == 'related' || $type == 'upsell') :?>
162-
<?php if ($type == 'related') :?>
163+
<?php if ($type == 'related' || $type == 'upsell'):?>
164+
<?php if ($type == 'related'):?>
163165
<div class="block <?= $block->escapeHtmlAttr($class) ?>" data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}' data-limit="<?= $block->escapeHtmlAttr($limit) ?>" data-shuffle="<?= /* @noEscape */ $shuffle ?>" data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
164-
<?php else :?>
166+
<?php else:?>
165167
<div class="block <?= $block->escapeHtmlAttr($class) ?>" data-mage-init='{"upsellProducts":{}}' data-limit="<?= $block->escapeHtmlAttr($limit) ?>" data-shuffle="<?= /* @noEscape */ $shuffle ?>" data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
166168
<?php endif; ?>
167-
<?php else :?>
169+
<?php else:?>
168170
<div class="block <?= $block->escapeHtmlAttr($class) ?>">
169171
<?php endif; ?>
170172
<div class="block-title title">
171173
<strong id="block-<?= $block->escapeHtmlAttr($class) ?>-heading" role="heading" aria-level="2"><?= $block->escapeHtml($title) ?></strong>
172174
</div>
173175
<div class="block-content content" aria-labelledby="block-<?= $block->escapeHtmlAttr($class) ?>-heading">
174-
<?php if ($type == 'related' && $canItemsAddToCart) :?>
176+
<?php if ($type == 'related' && $canItemsAddToCart):?>
175177
<div class="block-actions">
176178
<?= $block->escapeHtml(__('Check items to add to the cart or')) ?>
177179
<button type="button" class="action select" data-role="select-all"><span><?= $block->escapeHtml(__('select all')) ?></span></button>
178180
</div>
179181
<?php endif; ?>
180182
<div class="products wrapper grid products-grid products-<?= $block->escapeHtmlAttr($type) ?>">
181183
<ol class="products list items product-items">
182-
<?php foreach ($items as $_item) :?>
184+
<?php foreach ($items as $_item):?>
183185
<?php $available = ''; ?>
184-
<?php if (!$_item->isComposite() && $_item->isSaleable() && $type == 'related') :?>
185-
<?php if (!$_item->getRequiredOptions()) :?>
186+
<?php if (!$_item->isComposite() && $_item->isSaleable() && $type == 'related'):?>
187+
<?php if (!$_item->getRequiredOptions()):?>
186188
<?php $available = 'related-available'; ?>
187189
<?php endif; ?>
188190
<?php endif; ?>
189-
<?php if ($type == 'related' || $type == 'upsell') :?>
191+
<?php if ($type == 'related' || $type == 'upsell'):?>
190192
<li class="item product product-item" style="display: none;" data-shuffle-group="<?= $block->escapeHtmlAttr($_item->getPriority()) ?>" >
191-
<?php else :?>
193+
<?php else:?>
192194
<li class="item product product-item">
193195
<?php endif; ?>
194196
<div class="product-item-info <?= /* @noEscape */ $available ?>">
@@ -203,29 +205,29 @@ switch ($type = $block->getType()) {
203205

204206
<?= /* @noEscape */ $block->getProductPrice($_item) ?>
205207

206-
<?php if ($templateType) :?>
208+
<?php if ($templateType):?>
207209
<?= $block->getReviewsSummaryHtml($_item, $templateType) ?>
208210
<?php endif; ?>
209211

210-
<?php if ($canItemsAddToCart && !$_item->isComposite() && $_item->isSaleable() && $type == 'related') :?>
211-
<?php if (!$_item->getRequiredOptions()) :?>
212+
<?php if ($canItemsAddToCart && !$_item->isComposite() && $_item->isSaleable() && $type == 'related'):?>
213+
<?php if (!$_item->getRequiredOptions()):?>
212214
<div class="field choice related">
213215
<input type="checkbox" class="checkbox related" id="related-checkbox<?= $block->escapeHtmlAttr($_item->getId()) ?>" name="related_products[]" value="<?= $block->escapeHtmlAttr($_item->getId()) ?>" />
214216
<label class="label" for="related-checkbox<?= $block->escapeHtmlAttr($_item->getId()) ?>"><span><?= $block->escapeHtml(__('Add to Cart')) ?></span></label>
215217
</div>
216218
<?php endif; ?>
217219
<?php endif; ?>
218220

219-
<?php if ($showAddTo || $showCart) :?>
221+
<?php if ($showAddTo || $showCart):?>
220222
<div class="product actions product-item-actions">
221-
<?php if ($showCart) :?>
223+
<?php if ($showCart):?>
222224
<div class="actions-primary">
223-
<?php if ($_item->isSaleable()) :?>
224-
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)) :?>
225+
<?php if ($_item->isSaleable()):?>
226+
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)):?>
225227
<button class="action tocart primary" data-mage-init='{"redirectUrl": {"url": "<?= $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}' type="button" title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
226228
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
227229
</button>
228-
<?php else :?>
230+
<?php else:?>
229231
<?php $postDataHelper = $this->helper(Magento\Framework\Data\Helper\PostHelper::class);
230232
$postData = $postDataHelper->getPostData($block->escapeUrl($block->getAddToCartUrl($_item)), ['product' => $_item->getEntityId()])
231233
?>
@@ -235,19 +237,19 @@ switch ($type = $block->getType()) {
235237
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
236238
</button>
237239
<?php endif; ?>
238-
<?php else :?>
239-
<?php if ($_item->getIsSalable()) :?>
240+
<?php else:?>
241+
<?php if ($_item->getIsSalable()):?>
240242
<div class="stock available"><span><?= $block->escapeHtml(__('In stock')) ?></span></div>
241-
<?php else :?>
243+
<?php else:?>
242244
<div class="stock unavailable"><span><?= $block->escapeHtml(__('Out of stock')) ?></span></div>
243245
<?php endif; ?>
244246
<?php endif; ?>
245247
</div>
246248
<?php endif; ?>
247249

248-
<?php if ($showAddTo) :?>
250+
<?php if ($showAddTo):?>
249251
<div class="secondary-addto-links actions-secondary" data-role="add-to-links">
250-
<?php if ($addToBlock = $block->getChildBlock('addto')) :?>
252+
<?php if ($addToBlock = $block->getChildBlock('addto')):?>
251253
<?= $addToBlock->setProduct($_item)->getChildHtml() ?>
252254
<?php endif; ?>
253255
</div>

app/code/Magento/Elasticsearch/Model/Config/Backend/MinimumShouldMatch.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public function validateValue(): void
3434
{
3535
if (strlen($this->getValue()) && !preg_match('/^((\d+<)?-?\d+%?\s?)+$/', $this->getValue())) {
3636
throw new LocalizedException(
37-
__('Value for the field "%1" was not saved because of the incorrect format.', __('Minimum Terms to Match'))
37+
__(
38+
'Value for the field "%1" was not saved because of the incorrect format.',
39+
__('Minimum Terms to Match')
40+
)
3841
);
3942
}
4043
}

app/code/Magento/Elasticsearch6/Test/Unit/Model/Client/ElasticsearchTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Magento\Elasticsearch6\Model\Client\Elasticsearch;
1313

1414
/**
15-
* Class ElasticsearchTest
15+
* Test elasticsearch client methods
1616
*/
1717
class ElasticsearchTest extends \PHPUnit\Framework\TestCase
1818
{

0 commit comments

Comments
 (0)