Skip to content

Commit 62bc65a

Browse files
committed
MC-33069: Stabilize Unit tests
1 parent e6f1b90 commit 62bc65a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/internal/Magento/Framework/View/Helper/PathPattern.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function translatePatternFromGlob($path)
3939
protected function translateGroupsFromGlob($pattern)
4040
{
4141
preg_match_all('~\\\\\\{[^,\\}]+(?:,[^,\\}]*)*\\\\\\}~', $pattern, $matches, PREG_OFFSET_CAPTURE);
42-
for ($index = count($matches[0]) - 1; $index >= 0; --$index) {
42+
for ($index = count($matches[0]) - 1; $index >= 0; $index -= 1) {
4343
list($match, $offset) = $matches[0][$index];
4444
$replacement = substr_replace($match, '(?:', 0, 2);
4545
$replacement = substr_replace($replacement, ')', -2);
@@ -65,9 +65,9 @@ protected function translateGroupsFromGlob($pattern)
6565
protected function translateCharacterGroupsFromGlob($pattern)
6666
{
6767
preg_match_all('~\\\\\\[(\\\\\\!)?[^\\]]+\\\\\\]~i', $pattern, $matches, PREG_OFFSET_CAPTURE);
68-
for ($index = count($matches[0]) - 1; $index >= 0; --$index) {
68+
for ($index = count($matches[0]) - 1; $index >= 0; $index -= 1) {
6969
list($match, $offset) = $matches[0][$index];
70-
$exclude = !empty($matches[1][$index][0]);
70+
$exclude = !empty($matches[1][$index]);
7171
$replacement = substr_replace($match, '[' . ($exclude ? '^' : ''), 0, $exclude ? 4 : 2);
7272
$replacement = substr_replace($replacement, ']', -2);
7373
$replacement = str_replace('\\-', '-', $replacement);

setup/src/Magento/Setup/Fixtures/Quote/QuoteGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ private function prepareConfigurableProducts(array $productIds = [])
689689
foreach ($options as $option) {
690690
$attributesInfo[] = [
691691
"label" => $option->getLabel(),
692-
"value" => isset($option['options']) ? $option['options']['0']['label'] : null,
692+
"value" => $option['options']['0']['label'] ?? null,
693693
"option_id" => $option->getAttributeId(),
694694
"option_value" => $option->getValues()[0]->getValueIndex()
695695
];

0 commit comments

Comments
 (0)