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

ToolbarAsset::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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