Completed
Pull Request — master (#149)
by
unknown
22:27
created

ItemizedPaymentInformation::setShipmentCharges()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
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
    {
21
        $this->charges[] = $charge;
22
23
        return $this;
24
    }
25
26
    /**
27
     * @return ShipmentCharge[]
28
     */
29
    public function getShipmentCharges()
30
    {
31
        return $this->charges;
32
    }
33
34
    /**
35
     * @param ShipmentCharge[] $charges
36
     * @return $this
37
     */
38
    public function setShipmentCharges(array $charges)
39
    {
40
        $this->charges = $charges;
41
42
        return $this;
43
    }
44
}
45