items); } /** @return MigrationPlan[] */ public function getItems(): array { return $this->items; } public function getDirection(): string { return $this->direction; } public function getFirst(): MigrationPlan { if (count($this->items) === 0) { throw NoMigrationsFoundWithCriteria::new('first'); } return reset($this->items); } public function getLast(): MigrationPlan { if (count($this->items) === 0) { throw NoMigrationsFoundWithCriteria::new('last'); } return end($this->items); } }