Code Duplication    Length = 21-21 lines in 2 locations

src/Eccube/Repository/BlockRepository.php 1 location

@@ 143-163 (lines=21) @@
140
     * @return array                             ページ属性の配列
141
     * @deprecated since 3.0.0, to be removed in 3.1
142
     */
143
    public function getPageList(DeviceType $DeviceType, $where = null, $parameters = array())
144
    {
145
        $qb = $this->createQueryBuilder('l')
146
            ->orderBy('l.id', 'DESC')
147
            ->where('l.DeviceType = :DeviceType')
148
            ->setParameter('DeviceType', $DeviceType)
149
            ->andWhere('l.id <> 0')
150
            ->orderBy('l.id', 'ASC');
151
        if (!is_null($where)) {
152
            $qb->andWhere($where);
153
            foreach ($parameters as $key => $val) {
154
                $qb->setParameter($key, $val);
155
            }
156
        }
157
158
        $Pages = $qb
159
            ->getQuery()
160
            ->getResult();
161
162
        return $Pages;
163
    }
164
165
    /**
166
     * 書き込みパスの取得

src/Eccube/Repository/PageRepository.php 1 location

@@ 203-223 (lines=21) @@
200
     * @param  string[]                          $parameters 追加の検索パラメーター
201
     * @return array                             ページ属性の配列
202
     */
203
    public function getPageList(DeviceType $DeviceType, $where = null, $parameters = array())
204
    {
205
        $qb = $this->createQueryBuilder('l')
206
            ->orderBy('l.id', 'DESC')
207
            ->where('l.DeviceType = :DeviceType')
208
            ->setParameter('DeviceType', $DeviceType)
209
            ->andWhere('l.id <> 0')
210
            ->orderBy('l.id', 'ASC');
211
        if (!is_null($where)) {
212
            $qb->andWhere($where);
213
            foreach ($parameters as $key => $val) {
214
                $qb->setParameter($key, $val);
215
            }
216
        }
217
218
        $Pages = $qb
219
            ->getQuery()
220
            ->getResult();
221
222
        return $Pages;
223
    }
224
225
    /**
226
     * 書き込みパスの取得