GoogleChartsAsset::registerAssetFiles()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
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\googlecharts;
9
10
use craft\web\AssetBundle;
11
use craft\web\View;
12
13
class GoogleChartsAsset extends AssetBundle
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public function registerAssetFiles($view)
19
    {
20
        parent::registerAssetFiles($view);
21
22
        $view->registerJsFile('//www.gstatic.com/charts/loader.js', [
23
            'position' => View::POS_HEAD,
24
        ]);
25
    }
26
}