Passed
Push — master ( d54f6c...8277b0 )
by Giancarlos
02:59
created

Legend::setValue()   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 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
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: 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 6
    public function getCode()
41
    {
42 6
        return $this->code;
43
    }
44
45
    /**
46
     * @param string $code
47
     * @return Legend
48
     */
49 14
    public function setCode($code)
50
    {
51 14
        $this->code = $code;
52 14
        return $this;
53
    }
54
55
    /**
56
     * @return string
57
     */
58 6
    public function getValue()
59
    {
60 6
        return $this->value;
61
    }
62
63
    /**
64
     * @param string $value
65
     * @return Legend
66
     */
67 14
    public function setValue($value)
68
    {
69 14
        $this->value = $value;
70 14
        return $this;
71
    }
72
73
}