Service   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRedirection() 0 8 1
1
<?php
2
namespace PHPSC\PagSeguro\Requests;
3
4
use DateTime;
5
use PHPSC\PagSeguro\Service as BaseService;
6
use SimpleXMLElement;
7
8
/**
9
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
10
 */
11
abstract class Service extends BaseService
12
{
13
    /**
14
     * @param SimpleXMLElement $obj
15
     *
16
     * @return Response
17
     */
18 1
    protected function getRedirection(SimpleXMLElement $obj)
19
    {
20 1
        return new Redirection(
21 1
            (string) $obj->code,
22 1
            new DateTime((string) $obj->date),
23 1
            $this->credentials->getUrl(static::REDIRECT_TO)
24
        );
25
    }
26
}
27