Code Duplication    Length = 13-13 lines in 2 locations

Subscribers/CustomerGroup.php 1 location

@@ 104-116 (lines=13) @@
101
     *
102
     * @return int|null
103
     */
104
    public function getConnectCustomerGroupId()
105
    {
106
        $repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup');
107
        /** @var \Shopware\Models\Attribute\CustomerGroup $model */
108
        $model = $repo->findOneBy(array('connectGroup' => true));
109
110
        $customerGroup = null;
111
        if ($model && $model->getCustomerGroup()) {
112
            return $model->getCustomerGroup()->getId();
113
        }
114
115
        return null;
116
    }
117
118
}

Subscribers/Article.php 1 location

@@ 445-457 (lines=13) @@
442
    /**
443
     * @return \Shopware\Models\Customer\Group|null
444
     */
445
    public function getConnectCustomerGroup()
446
    {
447
        $repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup');
448
        /** @var \Shopware\Models\Attribute\CustomerGroup $model */
449
        $model = $repo->findOneBy(array('connectGroup' => true));
450
451
        $customerGroup = null;
452
        if ($model && $model->getCustomerGroup()) {
453
            return $model->getCustomerGroup();
454
        }
455
456
        return null;
457
    }
458
459
    /**
460
     * Load article detail