Passed
Branch master (7a0b0e)
by Randy
02:56
created

Car::getMarke()   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\Element;
7
use Dgame\Soap\Hydrator\Dom\AssemblableInterface;
8
use Dgame\Soap\Hydrator\Hydratable;
9
10
/**
11
 * Class Car
12
 * @package Dgame\Soap\Test\Object
13
 */
14
final class Car extends Hydratable implements AssemblableInterface
15
{
16
    /**
17
     * @var string
18
     */
19
    private $marke;
20
    /**
21
     * @var string
22
     */
23
    public $kennung;
24
25
    /**
26
     * @param string $marke
27
     */
28
    public function setMarke(string $marke)
29
    {
30
        $this->marke = $marke;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getMarke(): string
37
    {
38
        return $this->marke;
39
    }
40
41
    /**
42
     * @return Element
43
     */
44
    public function assemble(): Element
45
    {
46
        $element = new Element('car');
47
        $element->setAttribute(new Attribute('marke', $this->marke));
48
        $element->setAttribute(new Attribute('kennung', $this->kennung));
49
50
        return $element;
51
    }
52
}