Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 769-773 (lines=5) @@
766
                $errors = $this->customerValidation($app, $data);
767
768
                foreach ($errors as $error) {
769
                    if ($error->count() != 0) {
770
                        $response = new Response(json_encode('NG'), 400);
771
                        $response->headers->set('Content-Type', 'application/json');
772
                        return $response;
773
                    }
774
                }
775
776
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 777-781 (lines=5) @@
774
                }
775
776
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
777
                if (!$pref) {
778
                    $response = new Response(json_encode('NG'), 400);
779
                    $response->headers->set('Content-Type', 'application/json');
780
                    return $response;
781
                }
782
783
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
784
                if (!$Order) {