Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 682-686 (lines=5) @@
679
                $errors = $this->customerValidation($app, $data);
680
681
                foreach ($errors as $error) {
682
                    if ($error->count() != 0) {
683
                        $response = new Response(json_encode('NG'), 500);
684
                        $response->headers->set('Content-Type', 'application/json');
685
                        return $response;
686
                    }
687
                }
688
689
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 690-694 (lines=5) @@
687
                }
688
689
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
690
                if (!$pref) {
691
                    $response = new Response(json_encode('NG'), 500);
692
                    $response->headers->set('Content-Type', 'application/json');
693
                    return $response;
694
                }
695
696
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
697
                if (!$Order) {