Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 423-431 (lines=9) @@
420
     *
421
     * @return \DateTime
422
     */
423
    public function createDateTime($timestamp = null)
424
    {
425
        $dateTime = new \DateTime();
426
        if ($timestamp !== null) {
427
            $dateTime->setTimestamp($timestamp);
428
        }
429
430
        return $dateTime;
431
    }
432
433
    /**
434
     * Calls given Repository's aggregated SearchHandler::refresh().

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

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