Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

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