Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 751-755 (lines=5) @@
748
                $errors = $this->customerValidation($app, $data);
749
750
                foreach ($errors as $error) {
751
                    if ($error->count() != 0) {
752
                        $response = new Response(json_encode('NG'), 400);
753
                        $response->headers->set('Content-Type', 'application/json');
754
                        return $response;
755
                    }
756
                }
757
758
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 759-763 (lines=5) @@
756
                }
757
758
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
759
                if (!$pref) {
760
                    $response = new Response(json_encode('NG'), 400);
761
                    $response->headers->set('Content-Type', 'application/json');
762
                    return $response;
763
                }
764
765
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
766
                if (!$Order) {