Passed
Push — master ( 89f5ec...bbf25b )
by Ludwig
02:22
created

AbstractCompany::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of datamolino client.
5
 *
6
 * (c) 2018 cwd.at GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cwd\Datamolino\Model\Document;
15
16
abstract class AbstractCompany
17
{
18
    /** @var int|null */
19
    protected $id;
20
21
    /** @var string|null */
22
    protected $name;
23
24
    /** @var string|null */
25
    protected $tax_id;
26
27
    /** @var string|null */
28
    protected $vat_id;
29
30
    /** @var string|null */
31
    protected $street;
32
33
    /** @var string|null */
34
    protected $city;
35
36
    /** @var string|null */
37
    protected $postal_code;
38
39
    /** @var string|null */
40
    protected $country;
41
42
    /**
43
     * @return int
44
     */
45
    public function getId(): ?int
46
    {
47
        return $this->id;
48
    }
49
50
    /**
51
     * @param mixed $id
52
     *
53
     * @return AbstractCompany
54
     */
55
    public function setId($id): AbstractCompany
56
    {
57
        if ('' == $id) {
58
            return $this;
59
        }
60
        $this->id = intval($id);
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return null|string
67
     */
68
    public function getTaxId(): ?string
69
    {
70
        return $this->tax_id;
71
    }
72
73
    /**
74
     * @param null|string $tax_id
75
     *
76
     * @return AbstractCompany
77
     */
78
    public function setTaxId(?string $tax_id): AbstractCompany
79
    {
80
        $this->tax_id = $tax_id;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return null|string
87
     */
88
    public function getVatId(): ?string
89
    {
90
        return $this->vat_id;
91
    }
92
93
    /**
94
     * @param null|string $vat_id
95
     *
96
     * @return AbstractCompany
97
     */
98
    public function setVatId(?string $vat_id): AbstractCompany
99
    {
100
        $this->vat_id = $vat_id;
101
102
        return $this;
103
    }
104
105
    /**
106
     * @return null|string
107
     */
108
    public function getStreet(): ?string
109
    {
110
        return $this->street;
111
    }
112
113
    /**
114
     * @param null|string $street
115
     *
116
     * @return AbstractCompany
117
     */
118
    public function setStreet(?string $street): AbstractCompany
119
    {
120
        $this->street = $street;
121
122
        return $this;
123
    }
124
125
    /**
126
     * @return null|string
127
     */
128
    public function getCity(): ?string
129
    {
130
        return $this->city;
131
    }
132
133
    /**
134
     * @param null|string $city
135
     *
136
     * @return AbstractCompany
137
     */
138
    public function setCity(?string $city): AbstractCompany
139
    {
140
        $this->city = $city;
141
142
        return $this;
143
    }
144
145
    /**
146
     * @return null|string
147
     */
148
    public function getPostalCode(): ?string
149
    {
150
        return $this->postal_code;
151
    }
152
153
    /**
154
     * @param null|string $postal_code
155
     *
156
     * @return AbstractCompany
157
     */
158
    public function setPostalCode(?string $postal_code): AbstractCompany
159
    {
160
        $this->postal_code = $postal_code;
161
162
        return $this;
163
    }
164
165
    /**
166
     * @return null|string
167
     */
168
    public function getCountry(): ?string
169
    {
170
        return $this->country;
171
    }
172
173
    /**
174
     * @param null|string $country
175
     *
176
     * @return AbstractCompany
177
     */
178
    public function setCountry(?string $country): AbstractCompany
179
    {
180
        $this->country = $country;
181
182
        return $this;
183
    }
184
185
    /**
186
     * @return null|string
187
     */
188
    public function getName(): ?string
189
    {
190
        return $this->name;
191
    }
192
193
    /**
194
     * @param null|string $name
195
     *
196
     * @return AbstractCompany
197
     */
198
    public function setName(?string $name): AbstractCompany
199
    {
200
        $this->name = $name;
201
202
        return $this;
203
    }
204
}
205