Code Duplication    Length = 7-7 lines in 4 locations

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

@@ 161-167 (lines=7) @@
158
                        $searchData['category_id'] = $app['eccube.repository.category']->find($searchData['category_id']);
159
                    }
160
                    if (empty($status)) {
161
                        if (count($searchData['status']) > 0) {
162
                            $status_ids = array();
163
                            foreach ($searchData['status'] as $Status) {
164
                                $status_ids[] = $Status->getId();
165
                            }
166
                            $searchData['status'] = $app['eccube.repository.master.disp']->findBy(array('id' => $status_ids));
167
                        }
168
                        $searchData['link_status'] = null;
169
                        $searchData['stock_status'] = null;
170
                    }

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

@@ 130-136 (lines=7) @@
127
                    );
128
129
                    // セッションから検索条件を復元
130
                    if (count($searchData['sex']) > 0) {
131
                        $sex_ids = array();
132
                        foreach ($searchData['sex'] as $Sex) {
133
                            $sex_ids[] = $Sex->getId();
134
                        }
135
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
136
                    }
137
138
                    if (!is_null($searchData['pref'])) {
139
                        $searchData['pref'] = $app['eccube.repository.master.pref']->find($searchData['pref']->getId());

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

@@ 150-156 (lines=7) @@
147
                    if (!empty($searchData['status'])) {
148
                        $searchData['status'] = $app['eccube.repository.master.order_status']->find($searchData['status']);
149
                    }
150
                    if (count($searchData['sex']) > 0) {
151
                        $sex_ids = array();
152
                        foreach ($searchData['sex'] as $Sex) {
153
                            $sex_ids[] = $Sex->getId();
154
                        }
155
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
156
                    }
157
                    if (count($searchData['payment']) > 0) {
158
                        $payment_ids = array();
159
                        foreach ($searchData['payment'] as $Payment) {
@@ 157-163 (lines=7) @@
154
                        }
155
                        $searchData['sex'] = $app['eccube.repository.master.sex']->findBy(array('id' => $sex_ids));
156
                    }
157
                    if (count($searchData['payment']) > 0) {
158
                        $payment_ids = array();
159
                        foreach ($searchData['payment'] as $Payment) {
160
                            $payment_ids[] = $Payment->getId();
161
                        }
162
                        $searchData['payment'] = $app['eccube.repository.payment']->findBy(array('id' => $payment_ids));
163
                    }
164
                    $searchForm->setData($searchData);
165
                }
166
            }