SweetAlert2Asset   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 2
1
<?php
2
3
namespace dominus77\sweetalert2\assets;
4
5
use yii\web\AssetBundle;
6
7
/**
8
 * Class SweetAlert2Asset
9
 * @package dominus77\sweetalert2\assets
10
 */
11
class SweetAlert2Asset extends AssetBundle
12
{
13
    /**
14
     * @var string
15
     */
16
    public $sourcePath = '@npm/sweetalert2/dist';
17
18
    /**
19
     * @var array
20
     */
21
    public $js = [];
22
23
    /**
24
     * @inheritdoc
25
     */
26 5
    public function init()
27
    {
28 5
        $min = YII_ENV_DEV ? '' : '.min';
29 5
        $this->js[] = 'sweetalert2.all' . $min . '.js';
30 5
    }
31
}
32