IsChildlessTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A addChild() 0 2 1
1
<?php
2
/**
3
 * (c) Steve Nebes <[email protected]>.
4
 *
5
 *  For the full copyright and license information, please view the LICENSE
6
 *  file that was distributed with this source code.
7
 */
8
9
namespace SN\HtmlSanitizer\Node;
10
11
/**
12
 * Used by nodes which can't have children.
13
 *
14
 * @author Steve Nebes <[email protected]>
15
 */
16
trait IsChildlessTrait
17
{
18
    /**
19
     * @param NodeInterface $child
20
     */
21 1
    public function addChild(NodeInterface $child): void
0 ignored issues
show
Unused Code introduced by
The parameter $child is not used and could be removed. ( Ignorable by Annotation )

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

21
    public function addChild(/** @scrutinizer ignore-unused */ NodeInterface $child): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    {
23 1
    }
24
}
25