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

Text::create()   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 0
Metric Value
dl 0
loc 4
c 1
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 2
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
}