| 1 | <?php | ||
| 11 | class Rosters extends CollectionDto | ||
| 12 | { | ||
| 13 | /** | ||
| 14 | * @var Roster[] | ||
| 15 | */ | ||
| 16 | public $items; | ||
| 17 | |||
| 18 | 6 | public function __construct(array $rosters) | |
| 22 | |||
| 23 | public static function createFromArray(array $rosters): self | ||
| 33 | |||
| 34 | /** | ||
| 35 | * @return Traversable|Roster[] | ||
| 36 | */ | ||
| 37 | public function getIterator(): Traversable | ||
| 41 | |||
| 42 | 3 | public function getWinningRoster(): ?Roster | |
| 51 | |||
| 52 | /** | ||
| 53 | * Returns true if participant was victorious | ||
| 54 | * Returns false if opponent was victorious | ||
| 55 | * Returns null if nobody is victorious | ||
| 56 | */ | ||
| 57 | 2 | public function hasParticipantWon(Participant $participant): ?bool | |
| 71 | } | ||
| 72 |