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

Breadcrumb

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

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\FileIterator

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal