Code Duplication    Length = 8-8 lines in 2 locations

models/Page.php 1 location

@@ 266-273 (lines=8) @@
263
     *
264
     * @return Album[]
265
     */
266
    public function getAlbums()
267
    {
268
        return OwnerAlbum::getAlbumsQuery([
269
            'owner' => $this->tableName(),
270
            'ownerId' => $this->id,
271
            'ownerAttribute' => 'albums',
272
        ])->all();
273
    }
274
}
275

models/Product.php 1 location

@@ 248-255 (lines=8) @@
245
     *
246
     * @return Album[]
247
     */
248
    public function getAlbums()
249
    {
250
        return OwnerAlbum::getAlbumsQuery([
251
            'owner' => $this->tableName(),
252
            'ownerId' => $this->id,
253
            'ownerAttribute' => 'albums',
254
        ])->all();
255
    }
256
}
257