Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 608-612 (lines=5) @@
605
                $errors = $this->customerValidation($app, $data);
606
607
                foreach ($errors as $error) {
608
                    if ($error->count() != 0) {
609
                        $response = new Response(json_encode('NG'), 400);
610
                        $response->headers->set('Content-Type', 'application/json');
611
                        return $response;
612
                    }
613
                }
614
615
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 616-620 (lines=5) @@
613
                }
614
615
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
616
                if (!$pref) {
617
                    $response = new Response(json_encode('NG'), 400);
618
                    $response->headers->set('Content-Type', 'application/json');
619
                    return $response;
620
                }
621
622
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
623
                if (!$Order) {