WidgetAsset::init()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 4
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 0
1
<?php
2
/**
3
 * @link      http://www.writesdown.com/
4
 * @copyright Copyright (c) 2015 WritesDown
5
 * @license   http://www.writesdown.com/license/
6
 */
7
8
namespace backend\assets;
9
10
use yii\web\AssetBundle;
11
12
/**
13
 * WidgetAsset is used to register file assets on 'widget' page.
14
 *
15
 * @author  Agiel K. Saputra <[email protected]>
16
 * @since   0.1.0
17
 */
18 View Code Duplication
class WidgetAsset extends AssetBundle
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    public $basePath = '@webroot';
21
    public $baseUrl = '@web';
22
    public $depends = [
23
        'yii\jui\JuiAsset',
24
        'backend\assets\AppAsset',
25
    ];
26
27
    public function init()
28
    {
29
        YII_DEBUG ? $this->js = ['js/widget.js'] : $this->js = ['js/min/widget.js'];
30
    }
31
}
32