Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

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