| 1 | <?php |
||
| 16 | class VersionsCollection implements Countable, IteratorAggregate |
||
| 17 | { |
||
| 18 | public const SORT_ASC = 'ASC'; |
||
| 19 | public const SORT_DESC = 'DESC'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var Version[] |
||
| 23 | */ |
||
| 24 | protected $versions; |
||
| 25 | |||
| 26 | 7 | public function __construct(Version $version, Version ...$versions) |
|
| 30 | |||
| 31 | 2 | public function count() : int |
|
| 35 | |||
| 36 | 3 | public function getIterator() : Traversable |
|
| 40 | |||
| 41 | 2 | public function sort(string $direction = self::SORT_ASC) : void |
|
| 53 | |||
| 54 | 1 | public function matching(ConstraintInterface $constraint) : VersionsCollection |
|
| 63 | } |
||
| 64 |