Code Duplication    Length = 3-3 lines in 2 locations

src/Eccube/Repository/DeliveryRepository.php 1 location

@@ 40-42 (lines=3) @@
37
        if ($id == 0) {
38
            $em = $this->getEntityManager();
39
40
            if ($Creator == null) {
41
                $Creator = $em->getRepository('\Eccube\Entity\Member')->findOneBy(array(), array('rank' => 'DESC'));
42
            }
43
44
            if ($ProductType == null) {
45
                $ProductType = $em->getRepository('\Eccube\Entity\Master\ProductType')->findOneBy(array(), array('rank' => 'DESC'));

src/Eccube/Repository/PaymentRepository.php 1 location

@@ 42-44 (lines=3) @@
39
    {
40
        if ($id == 0) {
41
            $em = $this->getEntityManager();
42
            if ($Creator == null) {
43
                $Creator = $em->getRepository('\Eccube\Entity\Member')->findOneBy(array(), array('rank' => 'DESC'));
44
            }
45
46
            $Payment = $this->createPayment($Creator);
47
        } else {