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

@@ 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