Passed
Push — master ( 17c5f7...cb633b )
by Stefan
04:29 queued 02:00
created

EstimatedArrival   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 3
A getBusinessDaysInTransit() 0 4 1
A setBusinessDaysInTransit() 0 4 1
1
<?php
2
3
namespace Ups\Entity\RateTimeInTransit;
4
5
use Ups\Entity\EstimatedArrivalTrait;
6
7
class EstimatedArrival
8
{
9
    use EstimatedArrivalTrait;
10
11
    protected $businessDaysInTransit;
12
13
    /**
14
     * @param \stdClass|null $response
15
     */
16
    public function __construct(\stdClass $response = null)
17
    {
18
        if (null !== $response) {
19
            $this->build($response);
20
21
            if (isset($response->BusinessDaysInTransit)) {
22
                $this->businessDaysInTransit = $response->BusinessDaysInTransit;
23
            }
24
        }
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getBusinessDaysInTransit()
31
    {
32
        return $this->businessDaysInTransit;
33
    }
34
35
    /**
36
     * @param string $BusinessDaysInTransit
37
     */
38
    public function setBusinessDaysInTransit($BusinessDaysInTransit)
39
    {
40
        $this->businessDaysInTransit = $BusinessDaysInTransit;
41
    }
42
}
43