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

Text   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 18
c 1
b 0
f 0
wmc 3
lcom 0
cbo 2
ccs 6
cts 8
cp 0.75
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A create() 0 4 1
A getName() 0 4 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
}