Terminal::getTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Loevgaard\AltaPay\Entity;
3
4
use Loevgaard\AltaPay\Hydrator\HydratableInterface;
5
6
class Terminal implements HydratableInterface
7
{
8
    use CurrenciesTrait;
9
    use NaturesTrait;
10
11
    /**
12
     * @var string
13
     */
14
    protected $title;
15
16
    /**
17
     * @var string
18
     */
19
    protected $country;
20
21
    /**
22
     * @return string
23
     */
24 3
    public function getTitle() : string
25
    {
26 3
        return $this->title;
27
    }
28
29
    /**
30
     * @return string
31
     */
32 3
    public function getCountry() : string
33
    {
34 3
        return $this->country;
35
    }
36
37 6
    public function hydrateXml(\SimpleXMLElement $xml)
38
    {
39 6
        $this->title = (string)$xml->Title;
40 6
        $this->country = (string)$xml->Country;
41 6
        $this->hydrateCurrencies($xml);
42 6
        $this->hydrateNatures($xml);
43 6
    }
44
}
45