Code Duplication    Length = 23-23 lines in 2 locations

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

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