Code Duplication    Length = 12-15 lines in 5 locations

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

@@ 432-445 (lines=14) @@
429
    /**
430
     * @return $this
431
     */
432
    protected function createWebSite()
433
    {
434
        $website = new Website();
435
        $website->setName('web site');
436
        $website->setOriginId(1);
437
        $website->setCode('web site code');
438
        $website->setChannel($this->integration);
439
440
        $this->setReference('website', $website);
441
        $this->em->persist($website);
442
        $this->website = $website;
443
444
        return $this;
445
    }
446
447
    /**
448
     * @return $this
@@ 450-464 (lines=15) @@
447
    /**
448
     * @return $this
449
     */
450
    protected function createStore()
451
    {
452
        $store = new Store;
453
        $store->setName('demo store');
454
        $store->setChannel($this->integration);
455
        $store->setCode(1);
456
        $store->setWebsite($this->website);
457
        $store->setOriginId(1);
458
459
        $this->em->persist($store);
460
        $this->store = $store;
461
        $this->setReference('store', $store);
462
463
        return $this;
464
    }
465
466
    /**
467
     * @return Account
@@ 484-496 (lines=13) @@
481
    /**
482
     * @return $this
483
     */
484
    protected function createCustomerGroup()
485
    {
486
        $customerGroup = new CustomerGroup;
487
        $customerGroup->setName('group');
488
        $customerGroup->setChannel($this->integration);
489
        $customerGroup->setOriginId(1);
490
491
        $this->em->persist($customerGroup);
492
        $this->setReference('customer_group', $customerGroup);
493
        $this->customerGroup = $customerGroup;
494
495
        return $this;
496
    }
497
498
    /**
499
     * @return $this

src/OroCRM/Bundle/MagentoBundle/Tests/Functional/Fixture/CopyCustomerAddressToContact/LoadMagentoChannel.php 1 location

@@ 313-324 (lines=12) @@
310
    /**
311
     * @return $this
312
     */
313
    protected function createCustomerGroup()
314
    {
315
        $customerGroup = new CustomerGroup;
316
        $customerGroup->setName('group');
317
        $customerGroup->setChannel($this->integration);
318
        $customerGroup->setOriginId(1);
319
        $this->em->persist($customerGroup);
320
        $this->setReference('customer_group', $customerGroup);
321
        $this->customerGroup = $customerGroup;
322
323
        return $this;
324
    }
325
    /**
326
     * @return $this
327
     */

src/OroCRM/Bundle/MagentoBundle/Tests/Functional/Fixture/ResyncMagentoCustomerAddresses/LoadMagentoChannel.php 1 location

@@ 402-413 (lines=12) @@
399
    /**
400
     * @return $this
401
     */
402
    protected function createCustomerGroup()
403
    {
404
        $customerGroup = new CustomerGroup;
405
        $customerGroup->setName('group');
406
        $customerGroup->setChannel($this->integration);
407
        $customerGroup->setOriginId(1);
408
        $this->em->persist($customerGroup);
409
        $this->setReference('customer_group', $customerGroup);
410
        $this->customerGroup = $customerGroup;
411
412
        return $this;
413
    }
414
415
    /**
416
     * @return $this