Completed
Push — master ( 22c257...e714e6 )
by Gabriel
13:14 queued 10:09
created

HasExtensionsTrait::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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