ColorPickerAsset   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 9 2
1
<?php
2
3
namespace backend\assets\plugins;
4
5
use yii\web\AssetBundle;
6
use yii\web\JqueryAsset;
7
use backend\assets\BootstrapAsset;
8
9
/**
10
 * Class ColorPickerAsset
11
 * @package backend\assets\plugins
12
 */
13
class ColorPickerAsset extends AssetBundle
14
{
15
    /**
16
     * @var string
17
     */
18
    public $sourcePath = '@vendor/almasaeed2010/adminlte/bower_components/bootstrap-colorpicker';
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function init()
24
    {
25
        parent::init();
26
        $min = YII_ENV_DEV ? '' : '.min';
27
        $this->css = [
28
            'dist/css/bootstrap-colorpicker' . $min . '.css'
29
        ];
30
        $this->js = [
31
            'dist/js/bootstrap-colorpicker' . $min . '.js'
32
        ];
33
    }
34
35
    /**
36
     * @var array
37
     */
38
    public $depends = [
39
        JqueryAsset::class,
40
        BootstrapAsset::class
41
    ];
42
}
43