Passed
Push — master ( c2b6c4...5d2925 )
by Giancarlos
04:02
created

Direction::setDireccion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Giansalex
5
 * Date: 07/08/2017
6
 * Time: 23:56
7
 */
8
9
namespace Greenter\Model\Despatch;
10
11
use Greenter\Xml\Validator\DirectionValidator;
12
use Symfony\Component\Validator\Constraints as Assert;
13
14
/**
15
 * Class Direction
16
 * @package Greenter\Model\Despatch
17
 */
18
class Direction
19
{
20
    use DirectionValidator;
21
22
    /**
23
     * @Assert\NotBlank()
24
     * @Assert\Length(max="8")
25
     * @var string
26
     */
27
    private $ubigueo;
28
29
    /**
30
     * Direccion completa y detallada.
31
     *
32
     * @Assert\NotBlank()
33
     * @Assert\Length(max="100")
34
     * @var string
35
     */
36
    private $direccion;
37
38
    /**
39
     * Direction constructor.
40
     * @param string $ubigueo
41
     * @param string $direccion
42
     */
43 12
    public function __construct($ubigueo, $direccion)
44
    {
45 12
        $this->ubigueo = $ubigueo;
46 12
        $this->direccion = $direccion;
47 12
    }
48
49
50
    /**
51
     * @return string
52
     */
53 4
    public function getUbigueo()
54
    {
55 4
        return $this->ubigueo;
56
    }
57
58
    /**
59
     * @param string $ubigueo
60
     * @return Direction
61
     */
62 8
    public function setUbigueo($ubigueo)
63
    {
64 8
        $this->ubigueo = $ubigueo;
65 8
        return $this;
66
    }
67
68
    /**
69
     * @return string
70
     */
71 4
    public function getDireccion()
72
    {
73 4
        return $this->direccion;
74
    }
75
76
    /**
77
     * @param string $direccion
78
     * @return Direction
79
     */
80 8
    public function setDireccion($direccion)
81
    {
82 8
        $this->direccion = $direccion;
83 8
        return $this;
84
    }
85
}