Code Duplication    Length = 9-9 lines in 2 locations

eZ/Publish/API/Repository/Tests/BaseTest.php 1 location

@@ 431-439 (lines=9) @@
428
     *
429
     * @return \DateTime
430
     */
431
    public function createDateTime($timestamp = null)
432
    {
433
        $dateTime = new \DateTime();
434
        if ($timestamp !== null) {
435
            $dateTime->setTimestamp($timestamp);
436
        }
437
438
        return $dateTime;
439
    }
440
441
    /**
442
     * Calls given Repository's aggregated SearchHandler::refresh().

eZ/Publish/Core/Repository/Repository.php 1 location

@@ 1034-1042 (lines=9) @@
1031
     *
1032
     * @return \DateTime
1033
     */
1034
    public function createDateTime($timestamp = null)
1035
    {
1036
        $dateTime = new \DateTime();
1037
        if ($timestamp !== null) {
1038
            $dateTime->setTimestamp($timestamp);
1039
        }
1040
1041
        return $dateTime;
1042
    }
1043
}
1044