Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

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