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

TestCar::assemble()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
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 TestCar
11
 * @package Dgame\Soap\Test\Object
12
 */
13
final class TestCar implements AssemblableInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    private $marke;
19
    /**
20
     * @var string
21
     */
22
    public $kennung;
23
24
    /**
25
     * @param string $marke
26
     */
27
    public function setMarke(string $marke)
28
    {
29
        $this->marke = $marke;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getMarke(): string
36
    {
37
        return $this->marke;
38
    }
39
40
    /**
41
     * @return XmlElement
42
     */
43
    public function assemble(): XmlElement
44
    {
45
        $element = new XmlElement('car');
46
        $element->setAttribute(new Attribute('marke', $this->marke));
47
        $element->setAttribute(new Attribute('kennung', $this->kennung));
48
49
        return $element;
50
    }
51
}