protected function shouldExclude(string $path) : bool { foreach ($this->excludeFilesAndDirectories as $excludedPath) { if (starts_with($path, $excludedPath)) { return true; } } return false; }