Phone   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAreaCode() 0 4 1
A getNumber() 0 4 1
1
<?php
2
namespace PHPSC\PagSeguro\Customer;
3
4
use JMS\Serializer\Annotation as Serializer;
5
use PHPSC\PagSeguro\SerializerTrait;
6
7
/**
8
 * @Serializer\AccessType("public_method")
9
 * @Serializer\ReadOnly
10
 * @Serializer\XmlRoot("phone")
11
 *
12
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
13
 */
14
class Phone
15
{
16
    use SerializerTrait;
17
18
    /**
19
     * @var string
20
     */
21
    private $areaCode;
22
23
    /**
24
     * @var string
25
     */
26
    private $number;
27
28
    /**
29
     * @param string $areaCode
30
     * @param string $number
31
     */
32 21
    public function __construct($areaCode, $number)
33
    {
34 21
        $this->areaCode = $areaCode;
35 21
        $this->number = $number;
36 21
    }
37
38
    /**
39
     * @return string
40
     */
41 6
    public function getAreaCode()
42
    {
43 6
        return $this->areaCode;
44
    }
45
46
    /**
47
     * @return string
48
     */
49 6
    public function getNumber()
50
    {
51 6
        return $this->number;
52
    }
53
}
54