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

@@ 430-442 (lines=13) @@
427
    /**
428
     * @return \Shopware\Models\Customer\Group|null
429
     */
430
    public function getConnectCustomerGroup()
431
    {
432
        $repo = Shopware()->Models()->getRepository('Shopware\Models\Attribute\CustomerGroup');
433
        /** @var \Shopware\Models\Attribute\CustomerGroup $model */
434
        $model = $repo->findOneBy(array('connectGroup' => true));
435
436
        $customerGroup = null;
437
        if ($model && $model->getCustomerGroup()) {
438
            return $model->getCustomerGroup();
439
        }
440
441
        return null;
442
    }
443
444
    /**
445
     * Load article detail