diff --git a/src/RobotLoader/RobotLoader.php b/src/RobotLoader/RobotLoader.php index 649fd3f..de9402d 100644 --- a/src/RobotLoader/RobotLoader.php +++ b/src/RobotLoader/RobotLoader.php @@ -300,14 +300,14 @@ private function createFileIterator(string $dir): Nette\Utils\Finder $acceptFiles = preg_split('#[,\s]+#', $acceptFiles); } - $iterator = Nette\Utils\Finder::findFiles($acceptFiles) + $iterator = Nette\Utils\Finder::findFiles(...$acceptFiles) ->filter(function (SplFileInfo $file) use (&$disallow) { return $file->getRealPath() === false ? true : !isset($disallow[str_replace('\\', '/', $file->getRealPath())]); }) ->from($dir) - ->exclude($ignoreDirs) + ->exclude(...$ignoreDirs) ->filter($filter = function (SplFileInfo $dir) use (&$disallow) { if ($dir->getRealPath() === false) { return true;