Test Failed
Push — master ( 05d675...f4e7d7 )
by Giancarlos
04:02
created

Legend::setCode()   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
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Giansalex
5
 * Date: 17/07/2017
6
 * Time: 23:34
7
 */
8
9
namespace Greenter\Model\Sale;
10
11
use Greenter\Xml\Validator\LegendValidator;
12
use Symfony\Component\Validator\Constraints as Assert;
13
14
/**
15
 * Class Legend
16
 * @package Greenter\Model\Sale
17
 */
18
class Legend
19
{
20
    use LegendValidator;
21
22
    /**
23
     * @Assert\Length(
24
     *     min="4",
25
     *     max="4"
26
     * )
27
     * @var string
28
     */
29
    private $code;
30
31
    /**
32
     * @Assert\Length(max="100")
33
     * @var string
34
     */
35
    private $value;
36
37
    /**
38
     * @return string
39
     */
40
    public function getCode()
41
    {
42
        return $this->code;
43
    }
44
45
    /**
46
     * @param string $code
47
     * @return Legend
48
     */
49
    public function setCode($code)
50
    {
51
        $this->code = $code;
52
        return $this;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getValue()
59
    {
60
        return $this->value;
61
    }
62
63
    /**
64
     * @param string $value
65
     * @return Legend
66
     */
67
    public function setValue($value)
68
    {
69
        $this->value = $value;
70
        return $this;
71
    }
72
73
}