function ExcludeIterator::accept
File
-
vendor/
phpunit/ php-file-iterator/ src/ ExcludeIterator.php, line 38
Class
- ExcludeIterator
- @internal This class is not covered by the backward compatibility promise for phpunit/php-file-iterator
Namespace
SebastianBergmann\FileIteratorCode
public function accept() : bool {
$current = $this->current();
assert($current instanceof SplFileInfo);
$path = $current->getRealPath();
if ($path === false) {
return false;
}
foreach ($this->exclude as $exclude) {
if (str_starts_with($path, $exclude)) {
return false;
}
}
return true;
}