src/Workout/Track.php
public function lastTrackPoint(): TrackPoint
    {
        $lastTrackPoint = end($this->trackPoints);

        if (!$lastTrackPoint instanceof TrackPoint) {
            throw new \OutOfBoundsException('No track points points defined.');
        }

        reset($this->trackPoints);

        return $lastTrackPoint;
    }
public function lastTrackPoint(): TrackPoint
    {
        $lastTrackPoint = end($this->trackPoints);

        if (!$lastTrackPoint instanceof TrackPoint) {
            throw new \OutOfBoundsException('No track points points defined.');
        }

        reset($this->trackPoints);

        return $lastTrackPoint;
    }
public function lastTrackPoint ( ) : TrackPoint { $ lastTrackPoint = end ( $ this -> trackPoints ) ; if ( ! $ lastTrackPoint instanceof TrackPoint ) { throw new \ OutOfBoundsException ( 'No track points points defined.' ) ; } reset ( $ this -> trackPoints ) ; return $ lastTrackPoint ; }
Get the last track point.

@return TrackPoint
@throws \OutOfBoundsException If no track points are defined.
Get the last track point .