Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 449-457 (lines=9) @@
446
     *
447
     * @return \DateTime
448
     */
449
    public function createDateTime($timestamp = null)
450
    {
451
        $dateTime = new \DateTime();
452
        if ($timestamp !== null) {
453
            $dateTime->setTimestamp($timestamp);
454
        }
455
456
        return $dateTime;
457
    }
458
459
    /**
460
     * 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