Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 1014-1022 (lines=9) @@
1011
     *
1012
     * @return \DateTime
1013
     */
1014
    public function createDateTime($timestamp = null)
1015
    {
1016
        $dateTime = new \DateTime();
1017
        if ($timestamp !== null) {
1018
            $dateTime->setTimestamp($timestamp);
1019
        }
1020
1021
        return $dateTime;
1022
    }
1023
}
1024

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

@@ 456-464 (lines=9) @@
453
     *
454
     * @return \DateTime
455
     */
456
    public function createDateTime($timestamp = null)
457
    {
458
        $dateTime = new \DateTime();
459
        if ($timestamp !== null) {
460
            $dateTime->setTimestamp($timestamp);
461
        }
462
463
        return $dateTime;
464
    }
465
466
    /**
467
     * Calls given Repository's aggregated SearchHandler::refresh().