Test Failed
Pull Request — master (#21)
by
unknown
02:10
created

PaymentProfile::addCustomerPaymentProfileId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace CommerceGuys\AuthNet\DataTypes;
4
5
class PaymentProfile extends BaseDataType
6
{
7
8
    protected $propertyMap = [
9
        'customerType',
10
        'billTo',
11
        'payment',
12
        'defaultPaymentProfile',
13
        'customerPaymentProfileId'
14
    ];
15 3
16
    public function addPayment(PaymentMethodInterface $paymentMethod)
17 3
    {
18 3
        $this->properties['payment'][$paymentMethod->getType()] = $paymentMethod->toArray();
19
    }
20 3
21
    public function addBillTo(BillTo $billTo)
22 3
    {
23 3
        $this->addDataType($billTo);
24
    }
25
26
    public function addCustomerPaymentProfileId($id)
27
    {
28
        $this->properties['customerPaymentProfileId'] = $id;
29
    }
30
}
31