Problem description
Current behaviour of the library (as of 1.1.1) fills the Stats object wih timestamp value of the first and last point object. If there is no such datetime, these value are not inside the Stats object.
Problematic code:
$firstPoint = &$this->points[0];
$lastPoint = end($this->points);
$this->stats->startedAt = $firstPoint->time; // problematic if null
$this->stats->finishedAt = $lastPoint->time; // problematic if null
Expected behaviour
- startedAt suppose to have the first not-null $point->time value
- finishedAt suppose to have the last not-null $point->time value