Code Duplication    Length = 23-23 lines in 2 locations

src/Eccube/Controller/Admin/Setting/System/MemberController.php 2 locations

@@ 136-158 (lines=23) @@
133
134
    }
135
136
    public function up(Application $app, Request $request, $id)
137
    {
138
        $this->isTokenValid($app);
139
140
        $TargetMember = $app['eccube.repository.member']->find($id);
141
142
        if (!$TargetMember) {
143
            throw new NotFoundHttpException();
144
        }
145
146
        $status = false;
147
        if ('PUT' === $request->getMethod()) {
148
            $status = $app['eccube.repository.member']->up($TargetMember);
149
        }
150
151
        if ($status) {
152
            $app->addSuccess('admin.member.up.complete', 'admin');
153
        } else {
154
            $app->addError('admin.member.up.error', 'admin');
155
        }
156
157
        return $app->redirect($app->url('admin_setting_system_member'));
158
    }
159
160
    public function down(Application $app, Request $request, $id)
161
    {
@@ 160-182 (lines=23) @@
157
        return $app->redirect($app->url('admin_setting_system_member'));
158
    }
159
160
    public function down(Application $app, Request $request, $id)
161
    {
162
        $this->isTokenValid($app);
163
164
        $TargetMember = $app['eccube.repository.member']->find($id);
165
166
        if (!$TargetMember) {
167
            throw new NotFoundHttpException();
168
        }
169
170
        $status = false;
171
        if ('PUT' === $request->getMethod()) {
172
            $status = $app['eccube.repository.member']->down($TargetMember);
173
        }
174
175
        if ($status) {
176
            $app->addSuccess('admin.member.down.complete', 'admin');
177
        } else {
178
            $app->addError('admin.member.down.error', 'admin');
179
        }
180
181
        return $app->redirect($app->url('admin_setting_system_member'));
182
    }
183
184
    public function delete(Application $app, Request $request, $id)
185
    {