Completed
Push — master ( 6ba45c...e1d569 )
by Giancarlos
04:03
created

Despatch::setTipoDoc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Giansalex
5
 * Date: 07/08/2017
6
 * Time: 21:42
7
 */
8
9
namespace Greenter\Model\Despatch;
10
11
use Greenter\Model\Client\Client;
12
use Greenter\Model\Sale\Document;
13
use Greenter\Xml\Validator\DespatchValidator;
14
use Symfony\Component\Validator\Constraints as Assert;
15
16
/**
17
 * Class Despatch
18
 * @package Greenter\Model\Despatch
19
 */
20 View Code Duplication
class Despatch
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...
21
{
22
    use DespatchValidator;
23
24
    /**
25
     * @Assert\NotBlank()
26
     * @Assert\Length(max="2")
27
     * @var string
28
     */
29
    private $tipoDoc;
30
31
    /**
32
     * @Assert\NotBlank()
33
     * @Assert\Length(max="4")
34
     * @var string
35
     */
36
    private $serie;
37
38
    /**
39
     * @Assert\NotBlank()
40
     * @Assert\Length(max="8")
41
     * @var string
42
     */
43
    private $correlativo;
44
45
    /**
46
     * @Assert\Length(max="250")
47
     * @var string
48
     */
49
    private $observacion;
50
    /**
51
     * @Assert\Date()
52
     * @var \DateTime
53
     */
54
    private $fechaEmision;
55
56
    /**
57
     * @Assert\NotBlank()
58
     * @Assert\Valid()
59
     * @var Client
60
     */
61
    private $destinatario;
62
63
    /**
64
     * Datos del Establecimiento del tercero (cuando se ingrese)
65
     *
66
     * @Assert\Valid()
67
     * @var Client
68
     */
69
    private $tercero;
70
71
    /**
72
     * @Assert\NotBlank()
73
     * @Assert\Valid()
74
     * @var Shipment
75
     */
76
    private $envio;
77
78
    /**
79
     * @Assert\Valid()
80
     * @var Document
81
     */
82
    private $docBaja;
83
84
    /**
85
     * @Assert\Valid()
86
     * @var Document[]
87
     */
88
    private $relDocs;
89
90
    /**
91
     * @Assert\NotBlank()
92
     * @Assert\Valid()
93
     * @var DespatchDetail[]
94
     */
95
    private $details;
96
97
    /**
98
     * @return string
99
     */
100
    public function getTipoDoc()
101
    {
102
        return $this->tipoDoc;
103
    }
104
105
    /**
106
     * @param string $tipoDoc
107
     * @return Despatch
108
     */
109
    public function setTipoDoc($tipoDoc)
110
    {
111
        $this->tipoDoc = $tipoDoc;
112
        return $this;
113
    }
114
115
    /**
116
     * @return string
117
     */
118
    public function getSerie()
119
    {
120
        return $this->serie;
121
    }
122
123
    /**
124
     * @param string $serie
125
     * @return Despatch
126
     */
127
    public function setSerie($serie)
128
    {
129
        $this->serie = $serie;
130
        return $this;
131
    }
132
133
    /**
134
     * @return string
135
     */
136
    public function getCorrelativo()
137
    {
138
        return $this->correlativo;
139
    }
140
141
    /**
142
     * @param string $correlativo
143
     * @return Despatch
144
     */
145
    public function setCorrelativo($correlativo)
146
    {
147
        $this->correlativo = $correlativo;
148
        return $this;
149
    }
150
151
    /**
152
     * @return string
153
     */
154
    public function getObservacion()
155
    {
156
        return $this->observacion;
157
    }
158
159
    /**
160
     * @param string $observacion
161
     * @return Despatch
162
     */
163
    public function setObservacion($observacion)
164
    {
165
        $this->observacion = $observacion;
166
        return $this;
167
    }
168
169
    /**
170
     * @return \DateTime
171
     */
172
    public function getFechaEmision()
173
    {
174
        return $this->fechaEmision;
175
    }
176
177
    /**
178
     * @param \DateTime $fechaEmision
179
     * @return Despatch
180
     */
181
    public function setFechaEmision($fechaEmision)
182
    {
183
        $this->fechaEmision = $fechaEmision;
184
        return $this;
185
    }
186
187
    /**
188
     * @return Client
189
     */
190
    public function getDestinatario()
191
    {
192
        return $this->destinatario;
193
    }
194
195
    /**
196
     * @param Client $destinatario
197
     * @return Despatch
198
     */
199
    public function setDestinatario($destinatario)
200
    {
201
        $this->destinatario = $destinatario;
202
        return $this;
203
    }
204
205
    /**
206
     * @return Client
207
     */
208
    public function getTercero()
209
    {
210
        return $this->tercero;
211
    }
212
213
    /**
214
     * @param Client $tercero
215
     * @return Despatch
216
     */
217
    public function setTercero($tercero)
218
    {
219
        $this->tercero = $tercero;
220
        return $this;
221
    }
222
223
    /**
224
     * @return Shipment
225
     */
226
    public function getEnvio()
227
    {
228
        return $this->envio;
229
    }
230
231
    /**
232
     * @param Shipment $envio
233
     * @return Despatch
234
     */
235
    public function setEnvio($envio)
236
    {
237
        $this->envio = $envio;
238
        return $this;
239
    }
240
241
    /**
242
     * @return Document
243
     */
244
    public function getDocBaja()
245
    {
246
        return $this->docBaja;
247
    }
248
249
    /**
250
     * @param Document $docBaja
251
     * @return Despatch
252
     */
253
    public function setDocBaja($docBaja)
254
    {
255
        $this->docBaja = $docBaja;
256
        return $this;
257
    }
258
259
    /**
260
     * @return Document[]
261
     */
262
    public function getRelDocs()
263
    {
264
        return $this->relDocs;
265
    }
266
267
    /**
268
     * @param Document[] $relDocs
269
     * @return Despatch
270
     */
271
    public function setRelDocs($relDocs)
272
    {
273
        $this->relDocs = $relDocs;
274
        return $this;
275
    }
276
277
    /**
278
     * @return DespatchDetail[]
279
     */
280
    public function getDetails()
281
    {
282
        return $this->details;
283
    }
284
285
    /**
286
     * @param DespatchDetail[] $details
287
     * @return Despatch
288
     */
289
    public function setDetails($details)
290
    {
291
        $this->details = $details;
292
        return $this;
293
    }
294
}