Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 1046-1054 (lines=9) @@
1043
     *
1044
     * @return \DateTime
1045
     */
1046
    public function createDateTime($timestamp = null)
1047
    {
1048
        $dateTime = new \DateTime();
1049
        if ($timestamp !== null) {
1050
            $dateTime->setTimestamp($timestamp);
1051
        }
1052
1053
        return $dateTime;
1054
    }
1055
}
1056

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

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