Passed
Push — feature/refactor-subscription-... ( 326c18 )
by Darío
03:04
created

ShippingDetailName   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 8
c 1
b 0
f 0
dl 0
loc 25
ccs 8
cts 10
cp 0.8
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getFullName() 0 3 1
A setFullName() 0 5 1
A toArray() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
namespace PaymentGateway\PayPalSdk\Subscriptions;
4
5
class ShippingDetailName
6
{
7
    private string $fullName;
8
9 6
    public function __construct(string $fullName)
10
    {
11 6
        $this->fullName = $fullName;
12 6
    }
13
14
    public function getFullName(): ?string
15
    {
16
        return $this->fullName;
17
    }
18
19 1
    public function setFullName(string $fullName): self
20
    {
21 1
        $this->fullName = $fullName;
22
23 1
        return $this;
24
    }
25
26 4
    public function toArray(): array
27
    {
28
        return [
29 4
            'full_name' => $this->fullName
30
        ];
31
    }
32
}
33