Completed
Pull Request — master (#149)
by
unknown
26:16
created

ItemizedPaymentInformation::setShipmentCharges()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Ups\Entity;
4
5
class ItemizedPaymentInformation
6
{
7
8
    /**
9
     * Charges for Transportation (max 1) and Duties and Tax (max 1)
10
     *
11
     * @var array
12
     */
13
    private $charges = array();
14
15
    /**
16
     * @param ShipmentCharge $charge
17
     * @return $this
18
     */
19
    public function addShipmentCharge(ShipmentCharge $charge) {
20
        $this->charges[] = $charge;
21
22
        return $this;
23
    }
24
25
    /**
26
     * @return ShipmentCharge[]
27
     */
28
    public function getShipmentCharges() {
29
        return $this->charges;
30
    }
31
32
    /**
33
     * @param ShipmentCharge[] $charges
34
     * @return $this
35
     */
36
    public function setShipmentCharges(array $charges) {
37
        $this->charges = $charges;
38
39
        return $this;
40
    }
41
42
}
43