Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

@@ 1012-1020 (lines=9) @@
1009
     *
1010
     * @return \DateTime
1011
     */
1012
    public function createDateTime($timestamp = null)
1013
    {
1014
        $dateTime = new \DateTime();
1015
        if ($timestamp !== null) {
1016
            $dateTime->setTimestamp($timestamp);
1017
        }
1018
1019
        return $dateTime;
1020
    }
1021
}
1022