Passed
Push — master ( a3074c...38e910 )
by Alexey
02:36
created

MorrisAsset::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 9
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace backend\widgets\chart\morris\assets;
4
5
use yii\web\AssetBundle;
6
use yii\web\JqueryAsset;
7
use backend\assets\RaphaelAsset;
8
9
/**
10
 * Class MorrisAsset
11
 *
12
 * @package backend\widgets\chart\morris\assets
13
 */
14
class MorrisAsset extends AssetBundle
15
{
16
    /** @var string */
17
    public $sourcePath = '@vendor/almasaeed2010/adminlte/bower_components/morris.js';
18
19
    /**
20
     * @inheritDoc
21
     */
22
    public function init()
23
    {
24
        parent::init();
25
        $min = YII_ENV_DEV ? '' : '.min';
26
        $this->css = [
27
            'morris.css'
28
        ];
29
        $this->js = [
30
            'morris' . $min . '.js'
31
        ];
32
    }
33
34
    /**
35
     * @var string[]
36
     */
37
    public $depends = [
38
        JqueryAsset::class,
39
        RaphaelAsset::class
40
    ];
41
}
42