Completed
Push — master ( 3f79e5...1ec99b )
by Kevin
02:42
created

ClosedElement::toHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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