Code Duplication    Length = 14-15 lines in 2 locations

SwagConnect.php 2 locations

@@ 137-150 (lines=14) @@
134
     * @param bool $fullSetup
135
     * @throws RuntimeException
136
     */
137
    public function doSetup($context, $fullSetup = true)
138
    {
139
        $modelManager = Shopware()->Models();
140
        $setup = new Setup(
141
            $modelManager,
142
            Shopware()->Db(),
143
            new \ShopwarePlugins\Connect\Bootstrap\Menu(
144
                $this->getConfigComponents(),
145
                $modelManager,
146
                $context->assertMinimumVersion('5.2.6')
147
            )
148
        );
149
        $setup->run($fullSetup, $this->getPath());
150
    }
151
152
    /**
153
     * Performs the update of the system
@@ 175-189 (lines=15) @@
172
     * @param $context UninstallContext
173
     * @return bool
174
     */
175
    public function doUninstall($context)
176
    {
177
        $modelManager = Shopware()->Models();
178
        $uninstall = new Uninstall(
179
            $modelManager,
180
            Shopware()->Db(),
181
            new \ShopwarePlugins\Connect\Bootstrap\Menu(
182
                $this->getConfigComponents(),
183
                $modelManager,
184
                $context->assertMinimumVersion('5.2.6')
185
            )
186
        );
187
188
        return $uninstall->run();
189
    }
190
191
    public static function getSubscribedEvents()
192
    {