Code Duplication    Length = 10-10 lines in 2 locations

programs/utilit/exportentry.class.php 2 locations

@@ 334-343 (lines=10) @@
331
            $day = substr($this->iterator->from, 0, 10);
332
            $planned = $entry->getDayPlannedPeriods($day);
333
334
            if (0 === count($planned)) {
335
                $workingPeriods = $entry->getDayWorkingPeriods($day);
336
337
                if (0 === count($workingPeriods)) {
338
                    return bab_mktime($this->iterator->from);
339
                }
340
341
                $firstPeriod = reset($workingPeriods);
342
                return $firstPeriod->ts_begin;
343
            }
344
345
            $firstperiod = reset($planned);
346
@@ 373-382 (lines=10) @@
370
            $day = $end->getIsoDate();
371
            $planned = $entry->getDayPlannedPeriods($day);
372
373
            if (0 === count($planned)) {
374
                $workingPeriods = $entry->getDayWorkingPeriods($day);
375
376
                if (0 === count($workingPeriods)) {
377
                    return bab_mktime($this->iterator->to);
378
                }
379
380
                $lastPeriod = end($workingPeriods);
381
                return $lastPeriod->ts_end;
382
            }
383
384
            $lastperiod = end($planned);
385