Passed
Branch master (e714e6)
by Gabriel
13:58 queued 11:36
created

HasExtensionsTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
1
<?php
2
3
namespace Nip\View\Traits;
4
5
use Nip\View\Extensions\ExtensionInterface;
6
7
/**
8
 * Trait HasExtensionsTrait
9
 * @package Nip\View\Traits
10
 */
11
trait HasExtensionsTrait
12
{
13
    /**
14
     * @param ExtensionInterface $extension
15
     */
16 6
    public function register(ExtensionInterface $extension)
17
    {
18 6
        $extension->register($this);
0 ignored issues
show
Bug introduced by
$this of type Nip\View\Traits\HasExtensionsTrait is incompatible with the type Nip\View\ViewInterface expected by parameter $view of Nip\View\Extensions\ExtensionInterface::register(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
        $extension->register(/** @scrutinizer ignore-type */ $this);
Loading history...
19 6
    }
20
}
21