Code Duplication    Length = 9-9 lines in 2 locations

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().

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