Code Duplication    Length = 16-17 lines in 3 locations

src/Oro/Bundle/MagentoBundle/Tests/Functional/Fixture/LoadMagentoChannel.php 3 locations

@@ 298-314 (lines=17) @@
295
     *
296
     * @return CartAddress
297
     */
298
    protected function createCartAddress($region, $country, $originId)
299
    {
300
        $cartAddress = new CartAddress;
301
        $cartAddress->setRegion($region);
302
        $cartAddress->setCountry($country);
303
        $cartAddress->setCity('City');
304
        $cartAddress->setStreet('street');
305
        $cartAddress->setPostalCode(123456);
306
        $cartAddress->setFirstName('John');
307
        $cartAddress->setLastName('Doe');
308
        $cartAddress->setOriginId($originId);
309
        $cartAddress->setOrganization($this->organization);
310
311
        $this->em->persist($cartAddress);
312
313
        return $cartAddress;
314
    }
315
316
    /**
317
     * @param $region
@@ 323-339 (lines=17) @@
320
     *
321
     * @return CartAddress
322
     */
323
    protected function createGuestCartAddress($region, $country, $originId)
324
    {
325
        $cartAddress = new CartAddress;
326
        $cartAddress->setRegion($region);
327
        $cartAddress->setCountry($country);
328
        $cartAddress->setCity('City');
329
        $cartAddress->setStreet('street');
330
        $cartAddress->setPostalCode(123456);
331
        $cartAddress->setFirstName('Guest Jack');
332
        $cartAddress->setLastName('Guest White');
333
        $cartAddress->setOriginId($originId);
334
        $cartAddress->setOrganization($this->organization);
335
336
        $this->em->persist($cartAddress);
337
338
        return $cartAddress;
339
    }
340
341
    /**
342
     * @param $region
@@ 375-390 (lines=16) @@
372
     *
373
     * @return Address
374
     */
375
    protected function createAddress($region, $country)
376
    {
377
        $address = new Address;
378
        $address->setRegion($region);
379
        $address->setCountry($country);
380
        $address->setCity('City');
381
        $address->setStreet('street');
382
        $address->setPostalCode(123456);
383
        $address->setFirstName('John');
384
        $address->setLastName('Doe');
385
        $address->setOrganization($this->organization);
386
387
        $this->em->persist($address);
388
389
        return $address;
390
    }
391
392
    /**
393
     * @param                $oid