Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 1022-1030 (lines=9) @@
1019
     *
1020
     * @return \DateTime
1021
     */
1022
    public function createDateTime($timestamp = null)
1023
    {
1024
        $dateTime = new \DateTime();
1025
        if ($timestamp !== null) {
1026
            $dateTime->setTimestamp($timestamp);
1027
        }
1028
1029
        return $dateTime;
1030
    }
1031
}
1032

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().