Completed
Push — master ( d6c0fd...e0d2a4 )
by Joachim
12:44
created

CountryMapping::setCountryCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Loevgaard\PakkelabelsBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * This entity maps any (country) string to an ISO 3166 Alpha 2 country code
9
 *
10
 * @ORM\Entity
11
 * @ORM\Table(name="pakkelabels_country_mapping")
12
 */
13
class CountryMapping
14
{
15
    /**
16
     * @var int
17
     *
18
     * @ORM\Id
19
     * @ORM\GeneratedValue
20
     * @ORM\Column(type="integer")
21
     */
22
    protected $id;
23
24
    /**
25
     * @var string
26
     *
27
     * @ORM\Column(type="string", unique=true)
28
     */
29
    protected $source;
30
31
    /**
32
     * @var string
33
     *
34
     * @ORM\Column(type="string")
35
     */
36
    protected $countryCode;
37
38
    /**
39
     * @return int
40
     */
41
    public function getId(): int
42
    {
43
        return $this->id;
44
    }
45
46
    /**
47
     * @param int $id
48
     * @return CountryMapping
49
     */
50
    public function setId(int $id) : CountryMapping
51
    {
52
        $this->id = $id;
53
        return $this;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getSource(): string
60
    {
61
        return $this->source;
62
    }
63
64
    /**
65
     * @param string $source
66
     * @return CountryMapping
67
     */
68
    public function setSource(string $source) : CountryMapping
69
    {
70
        $this->source = $source;
71
        return $this;
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function getCountryCode(): string
78
    {
79
        return $this->countryCode;
80
    }
81
82
    /**
83
     * @param string $countryCode
84
     * @return CountryMapping
85
     */
86
    public function setCountryCode(string $countryCode) : CountryMapping
87
    {
88
        $this->countryCode = $countryCode;
89
        return $this;
90
    }
91
}
92