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

Direction::getUbigueo()   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: 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 6
    public function __construct($ubigueo, $direccion)
44
    {
45 6
        $this->ubigueo = $ubigueo;
46 6
        $this->direccion = $direccion;
47 6
    }
48
49
50
    /**
51
     * @return string
52
     */
53 2
    public function getUbigueo()
54
    {
55 2
        return $this->ubigueo;
56
    }
57
58
    /**
59
     * @param string $ubigueo
60
     * @return Direction
61
     */
62
    public function setUbigueo($ubigueo)
63
    {
64
        $this->ubigueo = $ubigueo;
65
        return $this;
66
    }
67
68
    /**
69
     * @return string
70
     */
71 2
    public function getDireccion()
72
    {
73 2
        return $this->direccion;
74
    }
75
76
    /**
77
     * @param string $direccion
78
     * @return Direction
79
     */
80
    public function setDireccion($direccion)
81
    {
82
        $this->direccion = $direccion;
83
        return $this;
84
    }
85
}