Decoder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A decode() 0 9 1
1
<?php
2
namespace PHPSC\PagSeguro\Purchases\Subscriptions;
3
4
use PHPSC\PagSeguro\Purchases\Decoder as BaseDecoder;
5
use SimpleXMLElement;
6
7
/**
8
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
9
 */
10
class Decoder extends BaseDecoder
11
{
12
    /**
13
     * @param SimpleXMLElement $obj
14
     *
15
     * @return Transaction
16
     */
17 1
    public function decode(SimpleXMLElement $obj)
18
    {
19 1
        return new Subscription(
20 1
            (string) $obj->name,
21 1
            $this->createDetails($obj),
22 1
            (string) $obj->tracker,
23 1
            (string) $obj->charge
24
        );
25
    }
26
}
27