Completed
Push — master ( d5cccf...59cfd0 )
by Edgar
09:03
created

G   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 32
wmc 4
lcom 0
cbo 3
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A getTransformAttribute() 0 4 1
A setTransformAttribute() 0 4 1
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
    public function __construct(ElementInterface $parent)
22
    {
23
        parent::__construct($parent);
24
25
        $this->transformImpl = Transform::newInstance($this->getTransformAttribute());
26
    }
27
28
    public function getName()
29
    {
30
        return 'g';
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    public function getTransformAttribute()
37
    {
38
        return $this->transform;
39
    }
40
41
    /**
42
     * @inheritdoc
43
     */
44
    public function setTransformAttribute($transformList)
45
    {
46
        $this->transform = $transformList;
47
    }
48
}