Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 680-684 (lines=5) @@
677
                $errors = $this->customerValidation($app, $data);
678
679
                foreach ($errors as $error) {
680
                    if ($error->count() != 0) {
681
                        $response = new Response(json_encode('NG'), 500);
682
                        $response->headers->set('Content-Type', 'application/json');
683
                        return $response;
684
                    }
685
                }
686
687
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
@@ 688-692 (lines=5) @@
685
                }
686
687
                $pref = $app['eccube.repository.master.pref']->findOneBy(array('name' => $data['customer_pref']));
688
                if (!$pref) {
689
                    $response = new Response(json_encode('NG'), 500);
690
                    $response->headers->set('Content-Type', 'application/json');
691
                    return $response;
692
                }
693
694
                $Order = $app['eccube.service.shopping']->getOrder($app['config']['order_processing']);
695
                if (!$Order) {