Terminal   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 39
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 4 1
A getCountry() 0 4 1
A hydrateXml() 0 7 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