Completed
Push — master ( baef0b...706633 )
by Randy
02:37
created

TestPhone::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Dgame\Soap\Test\Object;
4
5
use Dgame\Soap\Attribute\Attribute;
6
use Dgame\Soap\Hydrator\Dom\AssemblableInterface;
7
use Dgame\Soap\XmlElement;
8
9
/**
10
 * Class TestPhone
11
 * @package Dgame\Soap\Test\Object
12
 */
13
final class TestPhone implements AssemblableInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    private $name;
19
    /**
20
     * @var string
21
     */
22
    private $version;
23
24
    /**
25
     * @param string $name
26
     */
27
    public function setName(string $name)
28
    {
29
        $this->name = $name;
30
    }
31
32
    /**
33
     * @param string $value
34
     */
35
    public function setValue(string $value)
36
    {
37
        $this->version = $value;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getName(): string
44
    {
45
        return $this->name;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getValue(): string
52
    {
53
        return $this->version;
54
    }
55
56
    /**
57
     * @return XmlElement
58
     */
59
    public function assemble(): XmlElement
60
    {
61
        $element = new XmlElement('phone', $this->version);
62
        $element->setAttribute(new Attribute('name', $this->name));
63
64
        return $element;
65
    }
66
}