Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 391-399 (lines=9) @@
388
     *
389
     * @return \DateTime
390
     */
391
    public function createDateTime($timestamp = null)
392
    {
393
        $dateTime = new \DateTime();
394
        if ($timestamp !== null) {
395
            $dateTime->setTimestamp($timestamp);
396
        }
397
398
        return $dateTime;
399
    }
400
401
    /**
402
     * Calls given Repository's aggregated SearchHandler::refresh().

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

@@ 1002-1010 (lines=9) @@
999
     *
1000
     * @return \DateTime
1001
     */
1002
    public function createDateTime($timestamp = null)
1003
    {
1004
        $dateTime = new \DateTime();
1005
        if ($timestamp !== null) {
1006
            $dateTime->setTimestamp($timestamp);
1007
        }
1008
1009
        return $dateTime;
1010
    }
1011
}
1012