class TestFileCollection
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@psalm-immutable
@template-implements IteratorAggregate<int, TestFile>
Hierarchy
- class \PHPUnit\TextUI\Configuration\TestFileCollection implements \Countable, \IteratorAggregate
Expanded class hierarchy of TestFileCollection
1 file declares its use of TestFileCollection
- Loader.php in vendor/
phpunit/ phpunit/ src/ TextUI/ Configuration/ Xml/ Loader.php
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Configuration/ Value/ TestFileCollection.php, line 23
Namespace
PHPUnit\TextUI\ConfigurationView source
final class TestFileCollection implements Countable, IteratorAggregate {
/**
* @psalm-var list<TestFile>
*/
private readonly array $files;
/**
* @psalm-param list<TestFile> $files
*/
public static function fromArray(array $files) : self {
return new self(...$files);
}
private function __construct(TestFile ...$files) {
$this->files = $files;
}
/**
* @psalm-return list<TestFile>
*/
public function asArray() : array {
return $this->files;
}
public function count() : int {
return count($this->files);
}
public function getIterator() : TestFileCollectionIterator {
return new TestFileCollectionIterator($this);
}
public function isEmpty() : bool {
return $this->count() === 0;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
TestFileCollection::$files | private | property | @psalm-var list<TestFile> |
TestFileCollection::asArray | public | function | @psalm-return list<TestFile> |
TestFileCollection::count | public | function | |
TestFileCollection::fromArray | public static | function | @psalm-param list<TestFile> $files |
TestFileCollection::getIterator | public | function | |
TestFileCollection::isEmpty | public | function | |
TestFileCollection::__construct | private | function |