EcommerceWidgetAsset   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 23 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\ecommercewidget;
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
 * Realtime report widget asset bundle.
17
 */
18
class EcommerceWidgetAsset 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
            'EcommerceWidget.js',
42
        ];
43
44
        $this->css = [
45
            'EcommerceWidget.css',
46
        ];
47
48
        parent::init();
49
    }
50
}