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

@@ 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
    public function setBackgroundIndexer(BackgroundIndexer $backgroundIndexer)
1030
    {