Passed
Push — master ( 641a53...544fde )
by Giancarlos
02:24
created

Voided::setCorrelativo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
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: 15/07/2017
6
 * Time: 22:00
7
 */
8
9
namespace Greenter\Xml\Model\Voided;
10
11
use Greenter\Xml\Validator\VoidedValidator;
12
use Symfony\Component\Validator\Constraints as Assert;
13
14
/**
15
 * Class Voided
16
 * @package Greenter\Xml\Model\Voided
17
 */
18
class Voided
19
{
20
    use VoidedValidator;
21
22
    /**
23
     * @Assert\Length(max="3")
24
     * @var string
25
     */
26
    private $correlativo;
27
28
    /**
29
     * @Assert\Date()
30
     * @var \DateTime
31
     */
32
    private $fecGeneracion;
33
34
    /**
35
     * @Assert\NotBlank()
36
     * @Assert\Date()
37
     * @var \DateTime
38
     */
39
    private $fecComunicacion;
40
41
    /**
42
     * @Assert\All({
43
     *     @Assert\Valid()
44
     * })
45
     * @var VoidedDetail[]
46
     */
47
    private $documents;
48
49
    public function __construct()
50
    {
51
        $this->fecGeneracion = new \DateTime();
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getCorrelativo()
58
    {
59
        return $this->correlativo;
60
    }
61
62
    /**
63
     * @param string $correlativo
64
     * @return Voided
65
     */
66
    public function setCorrelativo($correlativo)
67
    {
68
        $this->correlativo = $correlativo;
69
        return $this;
70
    }
71
72
    /**
73
     * @return \DateTime
74
     */
75
    public function getFecGeneracion()
76
    {
77
        return $this->fecGeneracion;
78
    }
79
80
    /**
81
     * @param \DateTime $fecGeneracion
82
     */
83
    public function setFecGeneracion($fecGeneracion)
84
    {
85
        $this->fecGeneracion = $fecGeneracion;
86
    }
87
88
    /**
89
     * @return \DateTime
90
     */
91
    public function getFecComunicacion()
92
    {
93
        return $this->fecComunicacion;
94
    }
95
96
    /**
97
     * @param \DateTime $fecComunicacion
98
     */
99
    public function setFecComunicacion($fecComunicacion)
100
    {
101
        $this->fecComunicacion = $fecComunicacion;
102
    }
103
104
    /**
105
     * @return VoidedDetail[]
106
     */
107
    public function getDocuments()
108
    {
109
        return $this->documents;
110
    }
111
112
    /**
113
     * @param VoidedDetail[] $documents
114
     */
115
    public function setDocuments($documents)
116
    {
117
        $this->documents = $documents;
118
    }
119
}