Code Duplication    Length = 13-13 lines in 2 locations

Subscribers/Article.php 1 location

@@ 469-481 (lines=13) @@
466
    /**
467
     * @return \Shopware\Models\Customer\Group|null
468
     */
469
    public function getConnectCustomerGroup()
470
    {
471
        $repo = $this->modelManager->getRepository('Shopware\Models\Attribute\CustomerGroup');
472
        /** @var \Shopware\Models\Attribute\CustomerGroup $model */
473
        $model = $repo->findOneBy(['connectGroup' => true]);
474
475
        $customerGroup = null;
476
        if ($model && $model->getCustomerGroup()) {
477
            return $model->getCustomerGroup();
478
        }
479
480
        return null;
481
    }
482
483
    /**
484
     * Load article detail

Subscribers/CustomerGroup.php 1 location

@@ 129-141 (lines=13) @@
126
     *
127
     * @return int|null
128
     */
129
    private function getConnectCustomerGroupId()
130
    {
131
        $repo = $this->modelManager->getRepository('Shopware\Models\Attribute\CustomerGroup');
132
        /** @var \Shopware\Models\Attribute\CustomerGroup $model */
133
        $model = $repo->findOneBy(['connectGroup' => true]);
134
135
        $customerGroup = null;
136
        if ($model && $model->getCustomerGroup()) {
137
            return $model->getCustomerGroup()->getId();
138
        }
139
140
        return null;
141
    }
142
}
143