Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

@@ 413-421 (lines=9) @@
410
     *
411
     * @return \DateTime
412
     */
413
    public function createDateTime($timestamp = null)
414
    {
415
        $dateTime = new \DateTime();
416
        if ($timestamp !== null) {
417
            $dateTime->setTimestamp($timestamp);
418
        }
419
420
        return $dateTime;
421
    }
422
423
    /**
424
     * Calls given Repository's aggregated SearchHandler::refresh().