Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

@@ 464-472 (lines=9) @@
461
     *
462
     * @return \DateTime
463
     */
464
    public function createDateTime($timestamp = null)
465
    {
466
        $dateTime = new \DateTime();
467
        if ($timestamp !== null) {
468
            $dateTime->setTimestamp($timestamp);
469
        }
470
471
        return $dateTime;
472
    }
473
474
    /**
475
     * Calls given Repository's aggregated SearchHandler::refresh().