Passed
Pull Request — master (#193)
by Stefan
02:31
created

ServiceSummary::getEstimatedArrival()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Ups\Entity;
4
5 View Code Duplication
class ServiceSummary
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    use ServiceSummaryTrait;
8
9
    /** @deprecated */
10
    public $EstimatedArrival;
11
12
    /** @var  \Ups\Entity\EstimatedArrival */
13
    protected $estimatedArrival;
14
15
    /**
16
     * @param \stdClass|null $response
17
     */
18 4
    public function __construct(\stdClass $response = null)
19
    {
20 4
        $this->build($response);
21
        
22 4
        $this->setEstimatedArrival(new EstimatedArrival());
23
24 4
        if (null !== $response) {
25 3
            if (isset($response->EstimatedArrival)) {
26 3
                $this->setEstimatedArrival(new EstimatedArrival($response->EstimatedArrival));
27 3
            }
28 3
        }
29 4
    }
30
31
    /**
32
     * @return \Ups\Entity\EstimatedArrival
33
     */
34
    public function getEstimatedArrival()
35
    {
36
        return $this->estimatedArrival;
37
    }
38
39
    /**
40
     * @param \Ups\Entity\EstimatedArrival
41
     */
42 4
    public function setEstimatedArrival(EstimatedArrival $estimatedArrival)
43
    {
44 4
        $this->EstimatedArrival = $estimatedArrival;
0 ignored issues
show
Deprecated Code introduced by
The property Ups\Entity\ServiceSummary::$EstimatedArrival 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...
45 4
        $this->estimatedArrival = $estimatedArrival;
46 4
    }
47
}
48