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

@@ 1058-1066 (lines=9) @@
1055
     *
1056
     * @return \DateTime
1057
     */
1058
    public function createDateTime($timestamp = null)
1059
    {
1060
        $dateTime = new \DateTime();
1061
        if ($timestamp !== null) {
1062
            $dateTime->setTimestamp($timestamp);
1063
        }
1064
1065
        return $dateTime;
1066
    }
1067
}
1068