Code Duplication    Length = 9-9 lines in 2 locations

src/Eccube/Controller/CartController.php 2 locations

@@ 88-96 (lines=9) @@
85
        $result = $this->purchaseFlow->calculate($Cart, $app['eccube.purchase.context']());
86
87
        // 復旧不可のエラーが発生した場合はカートをクリアして再描画
88
        if ($result->hasError()) {
89
            foreach ($result->getErrors() as $error) {
90
                $app->addRequestError($error->getMessage());
91
            }
92
            $this->cartService->clear();
93
            $this->cartService->save();
94
95
            return $app->redirect($app->url('cart'));
96
        }
97
98
        $this->cartService->save();
99
@@ 172-180 (lines=9) @@
169
        $result = $this->purchaseFlow->calculate($Cart, $app['eccube.purchase.context']());
170
171
        // 復旧不可のエラーが発生した場合はカートをクリアしてカート一覧へ
172
        if ($result->hasError()) {
173
            foreach ($result->getErrors() as $error) {
174
                $app->addRequestError($error->getMessage());
175
            }
176
            $this->cartService->clear();
177
            $this->cartService->save();
178
179
            return $app->redirect($app->url('cart'));
180
        }
181
182
        $this->cartService->save();
183