PaymentInfo   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getValue() 0 4 1
A hydrateXml() 0 5 1
1
<?php
2
namespace Loevgaard\AltaPay\Entity;
3
4
use Loevgaard\AltaPay\Hydrator\HydratableInterface;
5
6
class PaymentInfo implements HydratableInterface
7
{
8
    /**
9
     * @var string
10
     */
11
    private $name;
12
13
    /**
14
     * @var string
15
     */
16
    private $value;
17
18
    /**
19
     * @return string
20
     */
21 3
    public function getName() : string
22
    {
23 3
        return $this->name;
24
    }
25
26
    /**
27
     * @return string
28
     */
29 3
    public function getValue() : string
30
    {
31 3
        return $this->value;
32
    }
33
34 21
    public function hydrateXml(\SimpleXMLElement $xml)
35
    {
36 21
        $this->name = (string)$xml['name'];
37 21
        $this->value = (string)$xml;
38 21
    }
39
}
40