Skip to content

Commit

Permalink
fixes + phpstan
Browse files Browse the repository at this point in the history
See fix at rector: rectorphp/rector-src#6164
  • Loading branch information
sreichel committed Jul 22, 2024
1 parent 03e1514 commit de343a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function parseDateTime($dateTimeString, $dateTimeFormat)
'm/d/y' => ['/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{1,2})/', ['y' => 3, 'm' => 1, 'd' => 2]],
];

foreach (array_keys($formats) as $supportedFormat) {
foreach ($formats as $supportedFormat => $regRule) {
if (strpos($dateTimeFormat, $supportedFormat, 0) !== false) {
$isSupportedFormatFound = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Dataflow/Model/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function parseFieldList($row)
$this->_fieldList[$fieldName] = $fieldName;
}
}
unset($fieldName, $value, $row);
unset($fieldName, $row);
}

/**
Expand Down
5 changes: 0 additions & 5 deletions phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3400,11 +3400,6 @@ parameters:
count: 1
path: app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php

-
message: "#^Offset int\\|string on non\\-empty\\-array\\<int\\|string, non\\-empty\\-array\\> in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php

-
message: "#^Variable \\$collection might not be defined\\.$#"
count: 1
Expand Down

0 comments on commit de343a3

Please sign in to comment.