Code Duplication    Length = 6-11 lines in 2 locations

Controller/AdminNodeController.php 1 location

@@ 129-134 (lines=6) @@
126
            $url = $this->admin->generateUrl('create', $params);
127
        }
128
129
        if (null !== $request->get('btn_update_and_see_page') || null !== $request->get('btn_create_and_see_page')) {
130
            return $this->redirectToRoute('alpixel_cms', [
131
                'slug'    => $object->getSlug(),
132
                '_locale' => $object->getLocale(),
133
            ]);
134
        }
135
136
        if ($this->getRestMethod() === 'DELETE') {
137
            $backToNodeList = true;

Controller/NodeController.php 1 location

@@ 96-106 (lines=11) @@
93
            if ($node !== null) {
94
                $translation = $entityManager->getRepository('AlpixelCMSBundle:Node')
95
                    ->findTranslation($node, $request->getLocale());
96
                if ($translation !== null) {
97
                    return $this->redirect(
98
                        $this->generateUrl(
99
                            'alpixel_cms',
100
                            [
101
                                'slug'    => $translation->getSlug(),
102
                                '_locale' => $translation->getLocale(),
103
                            ]
104
                        ), 301
105
                    );
106
                }
107
            }
108
        }
109