Passed
Push — master ( 224db0...04cfc9 )
by Thiago
33s
created

Purchaser::setFantasyName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace MrPrompt\ShipmentCommon\Base;
3
4
/**
5
 * Purchaser
6
 *
7
 * @author Thiago Paes <[email protected]>
8
 */
9
class Purchaser extends Person
10
{
11
    /**
12
     * Fantasy name
13
     *
14
     * @var string
15
     */
16
    private $fantasyName;
17
18
    /**
19
     * Social Reason
20
     *
21
     * @var string
22
     */
23
    private $socialReason;
24
25
    /**
26
     * State Registration
27
     *
28
     * @var string
29
     */
30
    private $stateRegistration;
31
32
    /**
33
     * Constructor
34
     * 
35
     * @param string $fantasyName
36
     * @param string $socialReason
37
     * @param string $stateRegistration
38
     */
39 6
    public function __construct(
40
        string $fantasyName = '',
41
        string $socialReason = '',
42
        string $stateRegistration = ''
43
    ) {
44 6
        $this->fantasyName = $fantasyName;
45 6
        $this->socialReason = $socialReason;
46 6
        $this->stateRegistration = $stateRegistration;
47 6
    }
48
49
    /**
50
     * @return string
51
     */
52 1
    public function getStateRegistration(): string
53
    {
54 1
        return $this->stateRegistration;
55
    }
56
57
    /**
58
     * @param string $stateRegistration
59
     */
60 1
    public function setStateRegistration(string $stateRegistration)
61
    {
62 1
        $this->stateRegistration = $stateRegistration;
63 1
    }
64
65
    /**
66
     * @return the $fantasyName
67
     */
68 1
    public function getFantasyName(): string
69
    {
70 1
        return $this->fantasyName;
71
    }
72
73
    /**
74
     * @param mixed $fantasyName
75
     */
76 1
    public function setFantasyName(string $fantasyName)
77
    {
78 1
        $this->fantasyName = $fantasyName;
79 1
    }
80
81
    /**
82
     * @return the $socialReason
83
     */
84 1
    public function getSocialReason(): string
85
    {
86 1
        return $this->socialReason;
87
    }
88
89
    /**
90
     * @param mixed $socialReason
91
     */
92 1
    public function setSocialReason(string $socialReason)
93
    {
94 1
        $this->socialReason = $socialReason;
95 1
    }
96
}
97