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

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