Test Failed
Push — master ( b95750...93ce75 )
by Edgar
03:22
created

Text::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
namespace nstdio\svg\text;
3
4
use nstdio\svg\ElementInterface;
5
6
/**
7
 * Class Text
8
 *
9
 * @package nstdio\svg\text
10
 * @author  Edgar Asatryan <[email protected]>
11
 */
12
class Text extends BaseText
13
{
14 1
    public function __construct(ElementInterface $parent, $value)
15
    {
16 1
        parent::__construct($parent);
17 1
        $this->element->setNodeValue($value);
18 1
    }
19
20
    public static function create(ElementInterface $parent, $value)
21
    {
22
        return new Text($parent, $value);
23
    }
24
25 1
    public function getName()
26
    {
27 1
        return 'text';
28
    }
29
}