Code Duplication    Length = 8-8 lines in 2 locations

models/Category.php 1 location

@@ 200-207 (lines=8) @@
197
    /**
198
     * @return array|\yii\db\ActiveRecord[]
199
     */
200
    public static function getActiveMenu()
201
    {
202
        return static::find()->select([
203
            'id', 'parentId', 'title', 'alias'
204
        ])->where([
205
            'active' => 1
206
        ])->all();
207
    }
208
}
209

models/Page.php 1 location

@@ 290-297 (lines=8) @@
287
    /**
288
     * @return array|\yii\db\ActiveRecord[]
289
     */
290
    public static function getActiveMenu()
291
    {
292
        return static::find()->select([
293
            'id', 'parentId', 'title', 'alias'
294
        ])->where([
295
            'active' => 1
296
        ])->all();
297
    }
298
299
    /**
300
     * Get albums, that catalog has.