Passed
Push — v1 ( fb0a8b...ee6368 )
by Andrew
05:31
created

RichVariablesAsset::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Rich Variables plugin for Craft CMS 3.x
4
 *
5
 * Allows you to easily use Craft Globals as variables in Rich Text fields
6
 *
7
 * @link      https://nystudio107.com
8
 * @copyright Copyright (c) 2017 nystudio107
9
 */
10
11
namespace nystudio107\richvariables\assetbundles\richvariables;
12
13
use craft\web\AssetBundle;
14
use craft\web\assets\cp\CpAsset;
15
use craft\redactor\assets\redactor\RedactorAsset;
0 ignored issues
show
Bug introduced by
The type craft\redactor\assets\redactor\RedactorAsset was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
17
/**
18
 * @author    nystudio107
19
 * @package   RichVariables
20
 * @since     1.0.0
21
 */
22
class RichVariablesAsset extends AssetBundle
23
{
24
    // Public Methods
25
    // =========================================================================
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function init()
31
    {
32
        $this->sourcePath = "@nystudio107/richvariables/assetbundles/richvariables/dist";
33
34
        $this->depends = [
35
            CpAsset::class,
36
            RedactorAsset::class,
37
        ];
38
39
        $this->js = [
40
            'js/foreachpolyfill.js',
41
        ];
42
43
        parent::init();
44
    }
45
}
46