Code Duplication    Length = 7-7 lines in 4 locations

src/Eccube/Controller/Admin/Customer/CustomerController.php 1 location

@@ 90-96 (lines=7) @@
87
                    );
88
89
                    // セッションから検索条件を復元
90
                    if (count($searchData['sex']) > 0) {
91
                        $sex_ids = array();
92
                        foreach ($searchData['sex'] as $Sex) {
93
                            $sex_ids[] = $Sex->getId();
94
                        }
95
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
96
                    }
97
98
                    if (!is_null($searchData['pref'])) {
99
                        $searchData['pref'] = $app['eccube.repository.master.pref']->find($searchData['pref']->getId());

src/Eccube/Controller/Admin/Order/OrderController.php 2 locations

@@ 109-115 (lines=7) @@
106
                    if (!empty($searchData['status'])) {
107
                        $searchData['status'] = $app['eccube.repository.master.order_status']->find($searchData['status']);
108
                    }
109
                    if (count($searchData['sex']) > 0) {
110
                        $sex_ids = array();
111
                        foreach ($searchData['sex'] as $Sex) {
112
                            $sex_ids[] = $Sex->getId();
113
                        }
114
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
115
                    }
116
                    if (count($searchData['payment']) > 0) {
117
                        $payment_ids = array();
118
                        foreach ($searchData['payment'] as $Payment) {
@@ 116-122 (lines=7) @@
113
                        }
114
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
115
                    }
116
                    if (count($searchData['payment']) > 0) {
117
                        $payment_ids = array();
118
                        foreach ($searchData['payment'] as $Payment) {
119
                            $payment_ids[] = $Payment->getId();
120
                        }
121
                        $searchData['payment'] = $app['eccube.repository.payment']->findBy(array('id' => $payment_ids));
122
                    }
123
                    $searchForm->setData($searchData);
124
                }
125
            }

src/Eccube/Controller/Admin/Product/ProductController.php 1 location

@@ 118-124 (lines=7) @@
115
                        $searchData['category_id'] = $app['eccube.repository.category']->find($searchData['category_id']);
116
                    }
117
                    if (empty($status)) {
118
                        if (count($searchData['status']) > 0) {
119
                            $status_ids = array();
120
                            foreach ($searchData['status'] as $Status) {
121
                                $status_ids[] = $Status->getId();
122
                            }
123
                            $searchData['status'] = $app['eccube.repository.master.disp']->findBy(array('id' => $status_ids));
124
                        }
125
                        $searchData['link_status'] = null;
126
                        $searchData['stock_status'] = null;
127
                    }