Skip to content

Commit

Permalink
Ignore psalm message that Generator is not iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
discordier committed Apr 24, 2024
1 parent c3ba71e commit 9c83889
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Configuration/Loader/AbstractFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,15 @@ public function import(
if (is_string($resource) && strlen($resource) !== $length = strcspn($resource, '*?{[')) {
$excluded = [];
foreach ((array) $exclude as $pattern) {
/** @psalm-suppress InvalidIterator - Psalm thinks a Generator is not iterable, why? */
foreach ($this->glob($pattern, true, $resources, false, true) as $path => $_ignored) {
// normalize Windows slashes
$excluded[str_replace('\\', '/', $path)] = true;
}
}

$isSubPath = 0 !== $length && str_contains(substr($resource, 0, $length), '/');
/** @psalm-suppress InvalidIterator - Psalm thinks a Generator is not iterable, why? */
foreach (
$this->glob(
$resource,
Expand Down

0 comments on commit 9c83889

Please sign in to comment.