Code Duplication    Length = 21-21 lines in 2 locations

src/Eccube/Repository/BlockRepository.php 1 location

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

src/Eccube/Repository/PageLayoutRepository.php 1 location

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