Code Duplication    Length = 20-21 lines in 2 locations

src/Eccube/Controller/Admin/Content/BlockController.php 1 location

@@ 39-59 (lines=21) @@
36
37
class BlockController extends AbstractController
38
{
39
    public function index(Application $app, Request $request)
40
    {
41
        $DeviceType = $app['eccube.repository.master.device_type']
42
            ->find(DeviceType::DEVICE_TYPE_PC);
43
44
        // 登録されているブロック一覧の取得
45
        $Blocks = $app['eccube.repository.block']->getList($DeviceType);
46
47
        $event = new EventArgs(
48
            array(
49
                'DeviceType' => $DeviceType,
50
                'Blocks' => $Blocks,
51
            ),
52
            $request
53
        );
54
        $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_CONTENT_BLOCK_INDEX_COMPLETE, $event);
55
56
        return $app->render('Content/block.twig', array(
57
            'Blocks' => $Blocks,
58
        ));
59
    }
60
61
    public function edit(Application $app, Request $request, $id = null)
62
    {

src/Eccube/Controller/Admin/Content/PageController.php 1 location

@@ 39-58 (lines=20) @@
36
37
class PageController extends AbstractController
38
{
39
    public function index(Application $app, Request $request)
40
    {
41
        $DeviceType = $app['eccube.repository.master.device_type']
42
            ->find(DeviceType::DEVICE_TYPE_PC);
43
44
        $PageLayouts = $app['eccube.repository.page_layout']->getPageList($DeviceType);
45
46
        $event = new EventArgs(
47
            array(
48
                'DeviceType' => $DeviceType,
49
                'PageLayouts' => $PageLayouts,
50
            ),
51
            $request
52
        );
53
        $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_CONTENT_PAGE_INDEX_COMPLETE, $event);
54
55
        return $app->render('Content/page.twig', array(
56
            'PageLayouts' => $PageLayouts,
57
        ));
58
    }
59
60
    public function edit(Application $app, Request $request, $id = null)
61
    {