Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 778-782 (lines=5) @@
775
                $errors = $this->customerValidation($app, $data);
776
777
                foreach ($errors as $error) {
778
                    if ($error->count() != 0) {
779
                        $response = new Response(json_encode('NG'), 400);
780
                        $response->headers->set('Content-Type', 'application/json');
781
                        return $response;
782
                    }
783
                }
784
785
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 786-790 (lines=5) @@
783
                }
784
785
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
786
                if (!$pref) {
787
                    $response = new Response(json_encode('NG'), 400);
788
                    $response->headers->set('Content-Type', 'application/json');
789
                    return $response;
790
                }
791
792
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
793
                if (!$Order) {