ReportWidgetAsset   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 33
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 25 1
1
<?php
2
/**
3
 * @link      https://dukt.net/analytics/
4
 * @copyright Copyright (c) 2022, Dukt
5
 * @license   https://github.com/dukt/analytics/blob/master/LICENSE.md
6
 */
7
8
namespace dukt\analytics\web\assets\reportwidget;
9
10
use craft\web\AssetBundle;
11
use craft\web\assets\cp\CpAsset;
12
use dukt\analytics\web\assets\analytics\AnalyticsAsset;
13
use dukt\analytics\web\assets\googlecharts\GoogleChartsAsset;
14
15
/**
16
 * Report widget asset bundle.
17
 */
18
class ReportWidgetAsset extends AssetBundle
19
{
20
    // Public Methods
21
    // =========================================================================
22
23
    /**
24
     * @inheritdoc
25
     */
26
    public function init()
27
    {
28
        // define the path that your publishable resources live
29
        $this->sourcePath = __DIR__.'/dist';
30
31
        // define the dependencies
32
        $this->depends = [
33
            CpAsset::class,
34
            GoogleChartsAsset::class,
35
            AnalyticsAsset::class,
36
        ];
37
38
        // define the relative path to CSS/JS files that should be registered with the page
39
        // when this asset bundle is registered
40
        $this->js = [
41
            'js/ReportWidgetSettings.js',
42
            'js/ReportWidget.js',
43
        ];
44
45
        $this->css = [
46
            'css/ReportWidget.css',
47
            'css/ReportWidgetSettings.css',
48
        ];
49
50
        parent::init();
51
    }
52
}