Completed
Push — master ( 1ed55c...1adee7 )
by Giancarlos
03:47
created

DespatchDetail::getCantidad()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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\Xml\Validator\DespatchDetailValidator;
12
use Symfony\Component\Validator\Constraints as Assert;
13
14
/**
15
 * Class DespatchDetail
16
 * @package Greenter\Model\Despatch
17
 */
18
class DespatchDetail
19
{
20
    use DespatchDetailValidator;
21
22
    /**
23
     * @Assert\Length(max="16")
24
     * @var string
25
     */
26
    private $codigo;
27
28
    /**
29
     * @Assert\NotBlank()
30
     * @Assert\Length(max="250")
31
     * @var string
32
     */
33
    private $descripcion;
34
35
    /**
36
     * @Assert\NotBlank()
37
     * @Assert\Length(max="4")
38
     * @var string
39
     */
40
    private $unidad;
41
42
    /**
43
     * @Assert\NotBlank()
44
     * @var int
45
     */
46
    private $cantidad;
47
48
    /**
49
     * @return string
50
     */
51 2
    public function getCodigo()
52
    {
53 2
        return $this->codigo;
54
    }
55
56
    /**
57
     * @param string $codigo
58
     * @return DespatchDetail
59
     */
60 6
    public function setCodigo($codigo)
61
    {
62 6
        $this->codigo = $codigo;
63 6
        return $this;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 2
    public function getDescripcion()
70
    {
71 2
        return $this->descripcion;
72
    }
73
74
    /**
75
     * @param string $descripcion
76
     * @return DespatchDetail
77
     */
78 6
    public function setDescripcion($descripcion)
79
    {
80 6
        $this->descripcion = $descripcion;
81 6
        return $this;
82
    }
83
84
    /**
85
     * @return string
86
     */
87 2
    public function getUnidad()
88
    {
89 2
        return $this->unidad;
90
    }
91
92
    /**
93
     * @param string $unidad
94
     * @return DespatchDetail
95
     */
96 6
    public function setUnidad($unidad)
97
    {
98 6
        $this->unidad = $unidad;
99 6
        return $this;
100
    }
101
102
    /**
103
     * @return int
104
     */
105 2
    public function getCantidad()
106
    {
107 2
        return $this->cantidad;
108
    }
109
110
    /**
111
     * @param int $cantidad
112
     * @return DespatchDetail
113
     */
114 6
    public function setCantidad($cantidad)
115
    {
116 6
        $this->cantidad = $cantidad;
117 6
        return $this;
118
    }
119
}