Code Duplication    Length = 10-12 lines in 2 locations

Components/Config.php 2 locations

@@ 628-637 (lines=10) @@
625
    /**
626
     * @return int
627
     */
628
    public function getDefaultShopId()
629
    {
630
        $builder = $this->manager->getConnection()->createQueryBuilder();
631
        $builder->select('cs.id')
632
            ->from('s_core_shops', 'cs')
633
            ->where('cs.default = :default')
634
            ->setParameter('default', true);
635
636
        return (int) $builder->execute()->fetchColumn();
637
    }
638
639
    /**
640
     * @return \Shopware\Models\Category\Category
@@ 642-653 (lines=12) @@
639
    /**
640
     * @return \Shopware\Models\Category\Category
641
     */
642
    public function getDefaultShopCategory()
643
    {
644
        $builder = $this->manager->getConnection()->createQueryBuilder();
645
        $builder->select('cs.category_id')
646
            ->from('s_core_shops', 'cs')
647
            ->where('cs.default = :default')
648
            ->setParameter('default', true);
649
650
        $categoryId = (int) $builder->execute()->fetchColumn();
651
652
        return $this->manager->find('Shopware\Models\Category\Category', $categoryId);
653
    }
654
655
    /**
656
     * @return \Shopware\Components\Model\ModelRepository|\Shopware\CustomModels\Connect\ConfigRepository