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

G::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 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
namespace nstdio\svg\container;
3
4
use nstdio\svg\attributes\Transformable;
5
use nstdio\svg\ElementInterface;
6
use nstdio\svg\traits\TransformTrait;
7
use nstdio\svg\util\Transform;
8
use nstdio\svg\util\TransformInterface;
9
10
/**
11
 * Class G
12
 *
13
 * @property string transform
14
 * @package svg\container
15
 * @author  Edgar Asatryan <[email protected]>
16
 */
17
class G extends Container implements Transformable, TransformInterface
18
{
19
    use TransformTrait;
20
21 9
    public function __construct(ElementInterface $parent)
22
    {
23 9
        parent::__construct($parent);
24
25 9
        $this->transformImpl = Transform::newInstance($this->getTransformAttribute());
26 9
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31 9
    public function getTransformAttribute()
32
    {
33 9
        return $this->transform;
34
    }
35
36
    public static function create(ElementInterface $parent)
37
    {
38
        return new G($parent);
39
    }
40
41 9
    public function getName()
42
    {
43 9
        return 'g';
44
    }
45
46
    /**
47
     * @inheritdoc
48
     */
49
    public function setTransformAttribute($transformList)
50
    {
51
        $this->transform = $transformList;
52
    }
53
}