Passed
Pull Request — master (#11)
by Rustam
12:00
created

ToolbarAsset   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Viewer\Asset;
6
7
use Yiisoft\Assets\AssetBundle;
0 ignored issues
show
Bug introduced by
The type Yiisoft\Assets\AssetBundle 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...
8
9
final class ToolbarAsset extends AssetBundle
10
{
11
    public ?string $basePath = '@assets';
12
    public ?string $baseUrl = '@assetsUrl';
13
14
    public function __construct()
15
    {
16
        $this->sourcePath = dirname(__DIR__, 2) . '/resources/assets';
0 ignored issues
show
Bug Best Practice introduced by
The property sourcePath does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
17
    }
18
19
    public array $js = [
20
        'js/toolbar.js',
21
    ];
22
23
    public array $css = [
24
        'css/toolbar.css',
25
    ];
26
}
27