public function getEnd(): ?\DateTimeInterface
    {
        $highest_date = null;
        foreach ($this->events as $event) {
            if (null === $highest_date || $event->getEnd() > $highest_date) {
                $highest_date = $event->getEnd();
            }
        }

        return $highest_date;
    }
public function getEnd(): ?\DateTimeInterface
    {
        $highest_date = null;
        foreach ($this->events as $event) {
            if (null === $highest_date || $event->getEnd() > $highest_date) {
                $highest_date = $event->getEnd();
            }
        }

        return $highest_date;
    }
public function getEnd ( ) : ? \ DateTimeInterface { $ highest_date = null ; foreach ( $ this -> events as $ event ) { if ( null === $ highest_date || $ event -> getEnd ( ) > $ highest_date ) { $ highest_date = $ event -> getEnd ( ) ; } } return $ highest_date ; }
Get the end date of the schedule.

@return ?\DateTimeInterface
Get the end date of the schedule .