Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Iterator.php

function Iterator::accept

File

vendor/phpunit/php-file-iterator/src/Iterator.php, line 56

Class

Iterator
@template-extends FilterIterator<int, string, AppendIterator>

Namespace

SebastianBergmann\FileIterator

Code

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);
}
RSS feed
Powered by Drupal