Skip to content

Commit de343a3

Browse files
committed
fixes + phpstan
See fix at rector: rectorphp/rector-src#6164
1 parent 03e1514 commit de343a3

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

app/code/core/Mage/Core/Model/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function parseDateTime($dateTimeString, $dateTimeFormat)
250250
'm/d/y' => ['/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{1,2})/', ['y' => 3, 'm' => 1, 'd' => 2]],
251251
];
252252

253-
foreach (array_keys($formats) as $supportedFormat) {
253+
foreach ($formats as $supportedFormat => $regRule) {
254254
if (strpos($dateTimeFormat, $supportedFormat, 0) !== false) {
255255
$isSupportedFormatFound = true;
256256
break;

app/code/core/Mage/Dataflow/Model/Batch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function parseFieldList($row)
9797
$this->_fieldList[$fieldName] = $fieldName;
9898
}
9999
}
100-
unset($fieldName, $value, $row);
100+
unset($fieldName, $row);
101101
}
102102

103103
/**

phpstan.dist.baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,11 +3400,6 @@ parameters:
34003400
count: 1
34013401
path: app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php
34023402

3403-
-
3404-
message: "#^Offset int\\|string on non\\-empty\\-array\\<int\\|string, non\\-empty\\-array\\> in isset\\(\\) always exists and is not nullable\\.$#"
3405-
count: 2
3406-
path: app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php
3407-
34083403
-
34093404
message: "#^Variable \\$collection might not be defined\\.$#"
34103405
count: 1

0 commit comments

Comments
 (0)