Code Duplication    Length = 6-10 lines in 2 locations

backend/controllers/MediaBrowserController.php 1 location

@@ 272-281 (lines=10) @@
269
     * @return string
270
     * @throws \yii\web\NotFoundHttpException
271
     */
272
    protected function getMediaFile($media)
273
    {
274
        $model = $this->findModel(ArrayHelper::getValue($media, 'id'));
275
276
        return Html::a(
277
            $model->title,
278
            ArrayHelper::getValue($media, 'link_value'),
279
            ['class' => 'media-file media-' . $model->id]
280
        );
281
    }
282
}
283

backend/views/media/index.php 1 location

@@ 86-91 (lines=6) @@
83
            [
84
                'label' => Yii::t('writesdown', 'File Name'),
85
                'format' => 'html',
86
                'value' => function ($model) {
87
                    /* @var $model common\models\Media */
88
                    $metadata = $model->getMeta('metadata');
89
90
                    return Html::a(ArrayHelper::getValue($metadata, 'filename', '#'), ['update', 'id' => $model->id]);
91
                },
92
            ],
93
            [
94
                'attribute' => 'username',