Passed
Push — master ( f26f03...fd642f )
by Derek Stephen
05:54
created

DebugBarPackage::addViews()   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 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bone\DebugBar;
6
7
use Barnacle\Container;
8
use Bone\Contracts\Container\ContainerInterface;
9
use Bone\Contracts\Container\RegistrationInterface;
10
use Bone\DebugBar\View\Extension\DebugBarExtension;
0 ignored issues
show
Bug introduced by
The type Bone\DebugBar\View\Extension\DebugBarExtension 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...
11
use Bone\View\ViewEngineInterface;
12 1
use Bone\View\ViewRegistrationInterface;
13
14 1
class DebugBarPackage implements RegistrationInterface, ViewRegistrationInterface
15
{
16
    public function addToContainer(ContainerInterface $c): void
17
    {
18
        $c[DebugBar::class] = new DebugBar();
19
    }
20
21
    public function addViews(): array
22
    {
23
        return [];
24
    }
25
26
    public function addViewExtensions(Container $c): array
27
    {
28
        $debugBar = $c->get(DebugBar::class);
29
        $viewEngine = $c->get(ViewEngineInterface::class);
30
31
        return [new DebugBarExtension($viewEngine, $debugBar)];
32
    }
33
}
34