@@ 200-216 (lines=17) @@ | ||
197 | /** |
|
198 | * @inheritdoc |
|
199 | */ |
|
200 | public function getStartDate() |
|
201 | { |
|
202 | $timestamps = $this->getTimestamps(); |
|
203 | ||
204 | if (empty($timestamps)) { |
|
205 | return $this->startDate; |
|
206 | } |
|
207 | ||
208 | $startDate = null; |
|
209 | foreach ($timestamps as $timestamp) { |
|
210 | if ($startDate === null || $timestamp->getStartDate() < $startDate) { |
|
211 | $startDate = $timestamp->getStartDate(); |
|
212 | } |
|
213 | } |
|
214 | ||
215 | return $startDate; |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * @inheritdoc |
|
@@ 221-237 (lines=17) @@ | ||
218 | /** |
|
219 | * @inheritdoc |
|
220 | */ |
|
221 | public function getEndDate() |
|
222 | { |
|
223 | $timestamps = $this->getTimestamps(); |
|
224 | ||
225 | if (empty($timestamps)) { |
|
226 | return $this->endDate; |
|
227 | } |
|
228 | ||
229 | $endDate = null; |
|
230 | foreach ($this->getTimestamps() as $timestamp) { |
|
231 | if ($endDate === null || $timestamp->getEndDate() > $endDate) { |
|
232 | $endDate = $timestamp->getEndDate(); |
|
233 | } |
|
234 | } |
|
235 | ||
236 | return $endDate; |
|
237 | } |
|
238 | ||
239 | /** |
|
240 | * @inheritdoc |