Passed
Push — master ( 2b63db...3a2bd9 )
by Stefan
07:15
created

EstimatedArrival   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 13
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 61
ccs 37
cts 37
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
F __construct() 0 38 13
1
<?php
2
3
namespace Ups\Entity;
4
5
class EstimatedArrival
6
{
7
    const EA_MONDAY = 'MON';
8
    const EA_TUESDAY = 'TUE';
9
    const EA_WEDNESDAY = 'WEB';
10
    const EA_THUSDAY = 'THU';
11
    const EA_FRIDAY = 'FRI';
12
    const EA_SATURDAY = 'SAT';
13
    // Sunday is an invalid day :-)
14
15
    public $BusinessTransitDays;
16
    public $Time;
17
    public $PickupDate;
18
    public $PickupTime;
19
    public $HolidayCount;
20
    public $DelayCount;
21
    public $Date;
22
    public $DayOfWeek;
23
    public $TotalTransitDays;
24
    public $CustomerCenterCutoff;
25
    public $RestDays;
26
27 3
    public function __construct($response = null)
28
    {
29 3
        if (null != $response) {
30 3
            if (isset($response->BusinessTransitDays)) {
31 3
                $this->BusinessTransitDays = $response->BusinessTransitDays;
32 3
            }
33 3
            if (isset($response->Time)) {
34 3
                $this->Time = $response->Time;
35 3
            }
36 3
            if (isset($response->PickupDate)) {
37 3
                $this->PickupDate = $response->PickupDate;
38 3
            }
39 3
            if (isset($response->PickupTime)) {
40 3
                $this->PickupTime = $response->PickupTime;
41 3
            }
42 3
            if (isset($response->HolidayCount)) {
43 3
                $this->HolidayCount = $response->HolidayCount;
44 3
            }
45 3
            if (isset($response->DelayCount)) {
46 3
                $this->DelayCount = $response->DelayCount;
47 3
            }
48 3
            if (isset($response->Date)) {
49 3
                $this->Date = $response->Date;
50 3
            }
51 3
            if (isset($response->DayOfWeek)) {
52 3
                $this->DayOfWeek = $response->DayOfWeek;
53 3
            }
54 3
            if (isset($response->TotalTransitDays)) {
55 3
                $this->TotalTransitDays = $response->TotalTransitDays;
56 3
            }
57 3
            if (isset($response->CustomerCenterCutoff)) {
58 3
                $this->CustomerCenterCutoff = $response->CustomerCenterCutoff;
59 3
            }
60 3
            if (isset($response->RestDays)) {
61 3
                $this->RestDays = $response->RestDays;
62 3
            }
63 3
        }
64 3
    }
65
}
66