Passed
Push — master ( fd642f...0fc7ad )
by Derek Stephen
07:59
created

DebugBarPackage   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 23
rs 10
ccs 0
cts 0
cp 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getAssetFolders() 0 3 1
A addViewExtensions() 0 6 1
A addViews() 0 3 1
A addToContainer() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bone\DebugBar;
6
7
use Barnacle\Container;
8
use Barnacle\RegistrationInterface;
9
use Bone\Contracts\Container\ContainerInterface;
10
use Bone\DebugBar\View\Extension\DebugBarExtension;
11
use Bone\View\ViewEngineInterface;
12 1
use Bone\View\ViewRegistrationInterface;
13
use Del\Booty\AssetRegistrationInterface;
0 ignored issues
show
Bug introduced by
The type Del\Booty\AssetRegistrationInterface 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...
14 1
15
class DebugBarPackage implements RegistrationInterface, ViewRegistrationInterface, AssetRegistrationInterface
16
{
17
    public function addToContainer(ContainerInterface $c): void
18
    {
19
        $c[DebugBar::class] = new DebugBar();
20
    }
21
22
    public function addViews(): array
23
    {
24
        return [];
25
    }
26
27
    public function addViewExtensions(Container $c): array
28
    {
29
        $debugBar = $c->get(DebugBar::class);
30
        $viewEngine = $c->get(ViewEngineInterface::class);
31
32
        return [new DebugBarExtension($viewEngine, $debugBar)];
33
    }
34
35
    public function getAssetFolders(): array
36
    {
37
        return ['debug-bar' => __DIR__ . '/../../../maximebf/debugbar/src/DebugBar/Resources'];
38
    }
39
}
40