Code Duplication    Length = 11-11 lines in 2 locations

src/Workout/Track.php 2 locations

@@ 149-159 (lines=11) @@
146
     *
147
     * @return \DateTime
148
     */
149
    public function recomputeStartDateTime()
150
    {
151
        $this->startDateTime = null;
152
        foreach ($this->trackPoints() as $trackPoint) {
153
            if ($this->startDateTime === null || $this->startDateTime > $trackPoint->dateTime()) {
154
                $this->startDateTime = clone $trackPoint->dateTime();
155
            }
156
        }
157
158
        return $this->startDateTime;
159
    }
160
161
    /**
162
     * Get the start date and time of the track.
@@ 180-190 (lines=11) @@
177
     *
178
     * @return \DateTime
179
     */
180
    public function recomputeEndDateTime()
181
    {
182
        $this->endDateTime = null;
183
        foreach ($this->trackPoints() as $trackPoint) {
184
            if ($this->startDateTime === null || $this->endDateTime < $trackPoint->dateTime()) {
185
                $this->endDateTime = clone $trackPoint->dateTime();
186
            }
187
        }
188
189
        return $this->endDateTime;
190
    }
191
192
    /**
193
     * Get the duration of the track.