Code Duplication    Length = 10-12 lines in 2 locations

Components/Config.php 2 locations

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