Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

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