Passed
Push — develop ( 4a5a66...90be87 )
by BENARD
04:36
created

PlayerPersonalDataTrait::getCollection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Traits\Entity\Player;
4
5
use DateTime;
6
use VideoGamesRecords\CoreBundle\Entity\Country;
7
use VideoGamesRecords\CoreBundle\Entity\Player;
8
9
trait PlayerPersonalDataTrait
10
{
11
    /**
12
     * @ORM\Column(name="presentation", type="text", length=65535, nullable=true)
13
     */
14
    private ?string $presentation;
15
16
    /**
17
     * @ORM\Column(name="collection", type="text", length=65535, nullable=true)
18
     */
19
    private ?string $collection;
20
21
    /**
22
     * @ORM\Column(name="birthDate", type="date", nullable=true)
23
     */
24
    protected ?DateTime $birthDate;
25
26
    /**
27
     * @ORM\Column(name="gender", type="string", length=1, nullable=false, options={"default" : "I"}))
28
     */
29
    protected string $gender = 'I';
30
31
    /**
32
     * @ORM\ManyToOne(targetEntity="VideoGamesRecords\CoreBundle\Entity\Country")
33
     * @ORM\JoinColumns({
34
     *   @ORM\JoinColumn(name="idCountry", referencedColumnName="id", nullable=true)
35
     * })
36
     */
37
    protected ?Country $country;
38
39
    /**
40
     * @ORM\Column(name="displayPersonalInfos", type="boolean", nullable=false)
41
     */
42
    private bool $displayPersonalInfos = false;
43
44
45
    /**
46
     * Set presentation
47
     *
48
     * @param string|null $presentation
49
     * @return $this
50
     */
51
    public function setPresentation(string $presentation = null): static
52
    {
53
        $this->presentation = $presentation;
54
55
        return $this;
56
    }
57
58
    /**
59
     * Get presentation
60
     * @return string|null
61
     */
62
    public function getPresentation(): ?string
63
    {
64
        return $this->presentation;
65
    }
66
67
    /**
68
     * Set collection
69
     *
70
     * @param string|null $collection
71
     * @return Player
72
     */
73
    public function setCollection(string $collection = null): static
74
    {
75
        $this->collection = $collection;
76
77
        return $this;
78
    }
79
80
    /**
81
     * Get collection
82
     * @return string|null
83
     */
84
    public function getCollection(): ?string
85
    {
86
        return $this->collection;
87
    }
88
89
    /**
90
     * @param DateTime|null $birthDate
91
     * @return $this
92
     */
93
    public function setBirthDate(DateTime $birthDate = null): static
94
    {
95
        $this->birthDate = $birthDate;
96
        return $this;
97
    }
98
99
    /**
100
     * @return DateTime|null
101
     */
102
    public function getBirthDate(): ?DateTime
103
    {
104
        return $this->birthDate;
105
    }
106
107
    /**
108
     * @param string $gender
109
     * @return $this
110
     */
111
    public function setGender(string $gender): static
112
    {
113
        $this->gender = $gender;
114
        return $this;
115
    }
116
117
    /**
118
     * @return string
119
     */
120
    public function getGender(): string
121
    {
122
        return $this->gender;
123
    }
124
125
126
    /**
127
     * Set displayPersonalInfos
128
     * @param bool $displayPersonalInfos
129
     * @return $this
130
     */
131
    public function setDisplayPersonalInfos(bool $displayPersonalInfos): static
132
    {
133
        $this->displayPersonalInfos = $displayPersonalInfos;
134
135
        return $this;
136
    }
137
138
    /**
139
     * Get DisplayPersonalInfos
140
     * @return bool
141
     */
142
    public function getDisplayPersonalInfos(): bool
143
    {
144
        return $this->displayPersonalInfos;
145
    }
146
147
148
    /**
149
     * @param $country
150
     * @return $this
151
     */
152
    public function setCountry($country): static
153
    {
154
        $this->country = $country;
155
        return $this;
156
    }
157
158
    /**
159
     * @return Country|null
160
     */
161
    public function getCountry(): ?Country
162
    {
163
        return $this->country;
164
    }
165
}
166