CustomerPhone   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 53
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCountryCode() 0 4 1
A getNumber() 0 4 1
A setCountryCode() 0 5 1
A setNumber() 0 5 1
A toArray() 0 7 1
1
<?php
2
3
namespace WeDevBr\Bankly\Inputs;
4
5
use WeDevBr\Bankly\Support\Contracts\CustomerPhoneInterface;
6
7
/**
8
 * CustomerPhone class
9
 *
10
 * PHP version 7.4|8.0
11
 *
12
 * @author    WeDev Brasil Team <[email protected]>
13
 * @author    Rafael Teixeira <[email protected]>
14
 * @copyright 2020 We Dev Tecnologia Ltda
15
 * @link      https://github.com/wedevBr/bankly-laravel
16
 */
17
class CustomerPhone implements CustomerPhoneInterface
18
{
19
    /** @var string */
20
    protected $countryCode;
21
22
    /** @var string */
23
    protected $number;
24
25
    /**
26
     * @return string
27
     */
28
    public function getCountryCode(): string
29
    {
30
        return $this->countryCode;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getNumber(): string
37
    {
38
        return $this->number;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function setCountryCode(string $countryCode): CustomerPhone
45
    {
46
        $this->countryCode = $countryCode;
47
        return $this;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function setNumber(string $number): CustomerPhone
54
    {
55
        $this->number = $number;
56
        return $this;
57
    }
58
59
    /**
60
     * @return array
61
     */
62
    public function toArray(): array
63
    {
64
        return [
65
            'number' => $this->number,
66
            'countryCode' => $this->countryCode
67
        ];
68
    }
69
}
70