SlimScrollAsset::init()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 2
nc 2
nop 0
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 SlimScrollAsset
11
 * @package backend\assets\plugins
12
 */
13
class SlimScrollAsset extends AssetBundle
14
{
15
    /**
16
     * @var string
17
     */
18
    public $sourcePath = '@vendor/almasaeed2010/adminlte/bower_components/jquery-slimscroll';
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function init()
24
    {
25
        parent::init();
26
        $min = YII_ENV_DEV ? '' : '.min';
27
        $this->js = ['jquery.slimscroll' . $min . '.js'];
28
    }
29
30
    /**
31
     * @var array
32
     */
33
    public $depends = [
34
        JqueryAsset::class,
35
        BootstrapAsset::class,
36
    ];
37
}
38