Completed
Push — master ( 077a27...3c5f4e )
by Stefan
05:01
created

SoldTo::toNode()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 17
Code Lines 10

Duplication

Lines 17
Ratio 100 %

Code Coverage

Tests 10
CRAP Score 3.0416

Importance

Changes 0
Metric Value
dl 17
loc 17
ccs 10
cts 12
cp 0.8333
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 10
nc 4
nop 1
crap 3.0416
1
<?php
2
3
namespace Ups\Entity;
4
5
class SoldTo extends ShipTo
6
{
7
    /**
8
     * @var string
9
     */
10
    private $option;
11
12
    /**
13
     * @inheritdoc
14
     */
15 1
    public function __construct(\stdClass $attributes = null)
16
    {
17 1
        parent::__construct($attributes);
18
19 1
        if (null !== $attributes) {
20
            if (isset($attributes->Option)) {
21
                $this->setOption($attributes->Option);
22
            }
23
        }
24 1
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getOption()
30
    {
31
        return $this->option;
32
    }
33
34
    /**
35
     * @param string $option
36
     *
37
     * @return $this
38
     */
39
    public function setOption($option)
40
    {
41
        $this->option = $option;
42
43
        return $this;
44
    }
45
}
46