function Iterator::accept
File
-
vendor/
phpunit/ php-file-iterator/ src/ Iterator.php, line 56
Class
- Iterator
- @template-extends FilterIterator<int, string, AppendIterator>
Namespace
SebastianBergmann\FileIteratorCode
public function accept() : bool {
$current = $this->getInnerIterator()
->current();
assert($current instanceof SplFileInfo);
$filename = $current->getFilename();
$realPath = $current->getRealPath();
if ($realPath === false) {
// @codeCoverageIgnoreStart
return false;
// @codeCoverageIgnoreEnd
}
return $this->acceptPath($realPath) && $this->acceptPrefix($filename) && $this->acceptSuffix($filename);
}