public function selectedFiles()
{
if ($this->includeFilesAndDirectories->isEmpty()) {
return [];
}
$finder = (new Finder())->ignoreDotFiles(false)->ignoreVCS(false)->files();
if ($this->shouldFollowLinks) {
$finder->followLinks();
}
$finder->in($this->includedDirectories());
foreach ($this->includedFiles() as $includedFile) {
(yield $includedFile);
}
foreach ($finder->getIterator() as $file) {
if ($this->shouldExclude($file)) {
continue;
}
(yield $file->getPathname());
}
}