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

Direction   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 68
ccs 14
cts 14
cp 1
rs 10
c 1
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUbigueo() 0 4 1
A getDireccion() 0 4 1
A setUbigueo() 0 5 1
A setDireccion() 0 5 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
}