Completed
Push — master ( 6e9edd...3f79e5 )
by Kevin
02:25
created

ClosedElement::appendChild()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
use Groundskeeper\Configuration;
6
use Groundskeeper\Tokens\Token;
7
8
class ClosedElement extends Element
9
{
10
    /**
11
     * Reimplement appendChild so that no children can be added.
12
     */
13
    public function appendChild(Token $token)
14
    {
15
        return $this;
16
    }
17
18
    /**
19
     * Reimplement prependChild so that no children can be added.
20
     */
21
    public function prependChild(Token $token)
22
    {
23
        return $this;
24
    }
25
26
    /**
27
     * Required by the Token interface.
28
     */
29 6
    public function toHtml($prefix, $suffix)
30
    {
31 6
        return $this->buildStartTag($prefix, $suffix);
32
    }
33
}
34