Code Duplication    Length = 13-13 lines in 2 locations

src/Eccube/Controller/Admin/Store/PluginController.php 2 locations

@@ 281-293 (lines=13) @@
278
     * @Method("PUT")
279
     * @Route("/{_admin}/store/plugin/{id}/enable", requirements={"id" = "\d+"}, name="admin_store_plugin_enable")
280
     */
281
    public function enable(Application $app, Plugin $Plugin)
282
    {
283
        $this->isTokenValid($app);
284
285
        if ($Plugin->getEnable() == Constant::ENABLED) {
286
            $app->addError('admin.plugin.already.enable', 'admin');
287
        } else {
288
            $this->pluginService->enable($Plugin);
289
            $app->addSuccess('admin.plugin.enable.complete', 'admin');
290
        }
291
292
        return $app->redirect($app->url('admin_store_plugin'));
293
    }
294
295
    /**
296
     * 対象のプラグインを無効にします。
@@ 301-313 (lines=13) @@
298
     * @Method("PUT")
299
     * @Route("/{_admin}/store/plugin/{id}/disable", requirements={"id" = "\d+"}, name="admin_store_plugin_disable")
300
     */
301
    public function disable(Application $app, Plugin $Plugin)
302
    {
303
        $this->isTokenValid($app);
304
305
        if ($Plugin->getEnable() == Constant::ENABLED) {
306
            $this->pluginService->disable($Plugin);
307
            $app->addSuccess('admin.plugin.disable.complete', 'admin');
308
        } else {
309
            $app->addError('admin.plugin.already.disable', 'admin');
310
        }
311
312
        return $app->redirect($app->url('admin_store_plugin'));
313
    }
314
315
316
    /**