Passed
Push — master ( 091f44...b672c6 )
by Evgenii
04:49
created

PictureWidget::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace floor12\files\components;
5
6
7
use floor12\files\models\File;
8
use yii\base\Widget;
9
10
class PictureWidget extends Widget
11
{
12
    /**
13
     * @var File
14
     */
15
    public $model;
16
    /**
17
     * @var integer
18
     */
19
    public $width;
20
    /**
21
     * @var string
22
     */
23
    public $alt;
24
25
    /**
26
     * @return string
27
     */
28
    public function run()
29
    {
30
        return $this->render('pictureWidget', [
31
            'model' => $this->model,
32
            'width' => $this->width,
33
            'alt' => $this->alt,
34
        ]);
35
    }
36
}
37