PaymentMethod   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 38
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 getType() 0 4 1
A getCode() 0 4 1
1
<?php
2
namespace PHPSC\PagSeguro\Purchases\Transactions;
3
4
class PaymentMethod
5
{
6
    /**
7
     * @var int
8
     */
9
    private $type;
10
11
    /**
12
     * @var int
13
     */
14
    private $code;
15
16
    /**
17
     * @param int $type
18
     * @param int $code
19
     */
20 2
    public function __construct($type, $code)
21
    {
22 2
        $this->type = (int) $type;
23 2
        $this->code = (int) $code;
24 2
    }
25
26
    /**
27
     * @return number
28
     */
29 1
    public function getType()
30
    {
31 1
        return $this->type;
32
    }
33
34
    /**
35
     * @return number
36
     */
37 1
    public function getCode()
38
    {
39 1
        return $this->code;
40
    }
41
}
42