mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
fix exclude_paths in FilesFinder
This commit is contained in:
parent
6adf8d4405
commit
5978bbbace
@ -105,15 +105,18 @@ final class FilesFinder
|
||||
}
|
||||
|
||||
$finder->filter(function (NativeSplFileInfo $splFileInfo) {
|
||||
// return false to remove file
|
||||
foreach ($this->excludePaths as $excludePath) {
|
||||
if (Strings::match($splFileInfo->getRealPath(), $excludePath)) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return fnmatch($splFileInfo->getRealPath(), $excludePath);
|
||||
if (fnmatch($splFileInfo->getRealPath(), $excludePath)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user