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

ItemizedPaymentInformation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 38
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addShipmentCharge() 0 5 1
A getShipmentCharges() 0 3 1
A setShipmentCharges() 0 5 1
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