Passed
Pull Request — 2.x (#52)
by Darío
05:02 queued 02:24
created

HasPaymentPreferences   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPaymentPreferences() 0 5 1
A getPaymentPreferences() 0 3 1
1
<?php
2
3
namespace PaymentGateway\PayPalSdk\Subscriptions\Concerns;
4
5
use PaymentGateway\PayPalSdk\Subscriptions\PaymentPreferences;
6
7
trait HasPaymentPreferences
8
{
9
    protected PaymentPreferences $paymentPreferences;
10
11 1
    public function getPaymentPreferences(): PaymentPreferences
12
    {
13 1
        return $this->paymentPreferences;
14
    }
15
16 5
    public function setPaymentPreferences(PaymentPreferences $paymentPreferences): self
17
    {
18 5
        $this->paymentPreferences = $paymentPreferences;
19
20 5
        return $this;
21
    }
22
}
23