Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

@@ 1043-1051 (lines=9) @@
1040
     *
1041
     * @return \DateTime
1042
     */
1043
    public function createDateTime($timestamp = null)
1044
    {
1045
        $dateTime = new \DateTime();
1046
        if ($timestamp !== null) {
1047
            $dateTime->setTimestamp($timestamp);
1048
        }
1049
1050
        return $dateTime;
1051
    }
1052
}
1053