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

@@ 1109-1117 (lines=9) @@
1106
     *
1107
     * @return \DateTime
1108
     */
1109
    public function createDateTime($timestamp = null)
1110
    {
1111
        $dateTime = new \DateTime();
1112
        if ($timestamp !== null) {
1113
            $dateTime->setTimestamp($timestamp);
1114
        }
1115
1116
        return $dateTime;
1117
    }
1118
}
1119