Completed
Pull Request — master (#145)
by
unknown
03:03
created

EstimatedArrival   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 11
lcom 0
cbo 2
dl 0
loc 48
ccs 0
cts 31
cp 0
rs 10
c 1
b 1
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
F __construct() 0 32 11
1
<?php
2
3
namespace Ups\Entity\Rate;
4
5
use Ups\Entity\Arrival;
6
use Ups\Entity\Pickup;
7
8
class EstimatedArrival
9
{
10
    public $BusinessTransitDays;
11
    public $Arrival;
12
    public $Pickup;
13
    public $DayOfWeek;
14
    public $CustomerCenterCutoff;
15
    public $DelayCount;
16
    public $HolidayCount;
17
    public $RestDays;
18
    public $TotalTransitDays;
19
20
    /**
21
     * @param \stdClass|null $response
22
     */
23
    public function __construct(\stdClass $response = null)
24
    {
25
        if (null !== $response) {
26
            if (isset($response->BusinessTransitDays)) {
27
                $this->BusinessTransitDays = $response->BusinessTransitDays;
28
            }
29
            if (isset($response->Arrival)) {
30
                $this->Arrival = new Arrival($response->Arrival);
31
            }
32
            if (isset($response->Pickup)) {
33
                $this->Pickup = new Pickup($response->Pickup);
34
            }
35
            if (isset($response->HolidayCount)) {
36
                $this->HolidayCount = $response->HolidayCount;
37
            }
38
            if (isset($response->DelayCount)) {
39
                $this->DelayCount = $response->DelayCount;
40
            }
41
            if (isset($response->DayOfWeek)) {
42
                $this->DayOfWeek = $response->DayOfWeek;
43
            }
44
            if (isset($response->TotalTransitDays)) {
45
                $this->TotalTransitDays = $response->TotalTransitDays;
46
            }
47
            if (isset($response->CustomerCenterCutoff)) {
48
                $this->CustomerCenterCutoff = $response->CustomerCenterCutoff;
49
            }
50
            if (isset($response->RestDays)) {
51
                $this->RestDays = $response->RestDays;
52
            }
53
        }
54
    }
55
}
56