Completed
Push — master ( 2792e5...4b31fe )
by Stefan
03:32
created

RateRequest   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 57.14%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 7
c 3
b 0
f 1
lcom 0
cbo 2
dl 0
loc 93
ccs 12
cts 21
cp 0.5714
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPickupType() 0 4 1
A setPickupType() 0 7 1
A getCustomerClassification() 0 4 1
A setCustomerClassification() 0 6 1
A getShipment() 0 4 1
A setShipment() 0 7 1
1
<?php
2
3
namespace Ups\Entity;
4
5
class RateRequest
6
{
7
    /** @deprecated */
8
    public $PickupType;
9
    /** @deprecated */
10
    public $Shipment;
11
12
    /**
13
     * @var PickupType
14
     */
15
    private $pickupType;
16
17
    /**
18
     * @var CustomerClassification
19
     */
20
    private $customerClassification;
21
22
    /**
23
     * @var Shipment
24
     */
25
    private $shipment;
26
27
    /**
28
     * @param null|object $attributes
29
     */
30 1
    public function __construct($attributes = null)
0 ignored issues
show
Unused Code introduced by
The parameter $attributes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32 1
        $this->setShipment(new Shipment());
33 1
        $this->setPickupType(new PickupType());
34 1
    }
35
36
    /**
37
     * @return PickupType
38
     */
39
    public function getPickupType()
40
    {
41
        return $this->pickupType;
42
    }
43
44
    /**
45
     * @param PickupType $pickupType
46
     *
47
     * @return $this
48
     */
49 1
    public function setPickupType(PickupType $pickupType)
50
    {
51 1
        $this->PickupType = $pickupType;
0 ignored issues
show
Deprecated Code introduced by
The property Ups\Entity\RateRequest::$PickupType has been deprecated.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
52 1
        $this->pickupType = $pickupType;
53
54 1
        return $this;
55
    }
56
57
    /**
58
     * @return CustomerClassification
59
     */
60
    public function getCustomerClassification()
61
    {
62
        return $this->customerClassification;
63
    }
64
65
    /**
66
     * @param CustomerClassification $customerClassification
67
     *
68
     * @return $this
69
     */
70
    public function setCustomerClassification(CustomerClassification $customerClassification)
71
    {
72
        $this->customerClassification = $customerClassification;
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return Shipment
79
     */
80
    public function getShipment()
81
    {
82
        return $this->shipment;
83
    }
84
85
    /**
86
     * @param Shipment $shipment
87
     *
88
     * @return $this
89
     */
90 1
    public function setShipment(Shipment $shipment)
91
    {
92 1
        $this->Shipment = $shipment;
0 ignored issues
show
Deprecated Code introduced by
The property Ups\Entity\RateRequest::$Shipment has been deprecated.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
93 1
        $this->shipment = $shipment;
94
95 1
        return $this;
96
    }
97
}
98