Completed
Push — master ( 2ef37c...52cad6 )
by Oleg
02:13
created

DbConfiguration::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Db\Entities;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use SlayerBirden\DataFlowServer\Domain\Entities\User;
8
9
/**
10
 * @ORM\Entity @ORM\Table(name="configuration")
11
 **/
12
class DbConfiguration
13
{
14
    /**
15
     * @ORM\Id
16
     * @ORM\Column(type="integer")
17
     * @ORM\GeneratedValue
18
     * @var integer|null
19
     **/
20
    private $id;
21
    /**
22
     * @ORM\Column(type="string")
23
     * @var string
24
     **/
25
    private $title;
26
    /**
27
     * @ORM\ManyToOne(targetEntity="\SlayerBirden\DataFlowServer\Domain\Entities\User")
28
     * @ORM\JoinColumn(nullable=false)
29
     * @var User
30
     **/
31
    private $owner;
32
    /**
33
     * @ORM\Column(type="string", nullable=true)
34
     * @var string|null
35
     **/
36
    private $dbname;
37
    /**
38
     * @ORM\Column(type="string", nullable=true)
39
     * @var string|null
40
     **/
41
    private $user;
42
    /**
43
     * @ORM\Column(type="string", nullable=true)
44
     * @var string|null
45
     **/
46
    private $password;
47
    /**
48
     * @ORM\Column(type="string", nullable=true)
49
     * @var string|null
50
     **/
51
    private $host;
52
    /**
53
     * @ORM\Column(type="string", nullable=true)
54
     * @var string|null
55
     **/
56
    private $driver;
57
    /**
58
     * @ORM\Column(type="integer", nullable=true)
59
     * @var integer|null
60
     **/
61
    private $port;
62
    /**
63
     * @ORM\Column(type="string", nullable=true)
64
     * @var string|null
65
     **/
66
    private $url;
67
68
    /**
69
     * @return int|null
70
     */
71 2
    public function getId(): ?int
72
    {
73 2
        return $this->id;
74
    }
75
76
    /**
77
     * @return string
78
     */
79 2
    public function getTitle(): string
80
    {
81 2
        return $this->title;
82
    }
83
84
    /**
85
     * @param string $title
86
     */
87 2
    public function setTitle(string $title): void
88
    {
89 2
        $this->title = $title;
90 2
    }
91
92
    /**
93
     * @return User
94
     */
95 2
    public function getOwner(): User
96
    {
97 2
        return $this->owner;
98
    }
99
100
    /**
101
     * @param User $owner
102
     */
103 2
    public function setOwner(User $owner): void
104
    {
105 2
        $this->owner = $owner;
106 2
    }
107
108
    /**
109
     * @return string|null
110
     */
111 2
    public function getDbname(): ?string
112
    {
113 2
        return $this->dbname;
114
    }
115
116
    /**
117
     * @param string $dbname
118
     */
119 1
    public function setDbname(string $dbname): void
120
    {
121 1
        $this->dbname = $dbname;
122 1
    }
123
124
    /**
125
     * @return string|null
126
     */
127 2
    public function getUser(): ?string
128
    {
129 2
        return $this->user;
130
    }
131
132
    /**
133
     * @param string $user
134
     */
135 1
    public function setUser(string $user): void
136
    {
137 1
        $this->user = $user;
138 1
    }
139
140
    /**
141
     * @return string|null
142
     */
143 2
    public function getPassword(): ?string
144
    {
145 2
        return $this->password;
146
    }
147
148
    /**
149
     * @param string $password
150
     */
151 1
    public function setPassword(string $password): void
152
    {
153 1
        $this->password = $password;
154 1
    }
155
156
    /**
157
     * @return string|null
158
     */
159 2
    public function getHost(): ?string
160
    {
161 2
        return $this->host;
162
    }
163
164
    /**
165
     * @param string $host
166
     */
167 1
    public function setHost(string $host): void
168
    {
169 1
        $this->host = $host;
170 1
    }
171
172
    /**
173
     * @return string|null
174
     */
175 2
    public function getDriver(): ?string
176
    {
177 2
        return $this->driver;
178
    }
179
180
    /**
181
     * @param string $driver
182
     */
183 1
    public function setDriver(string $driver): void
184
    {
185 1
        $this->driver = $driver;
186 1
    }
187
188
    /**
189
     * @return int|null
190
     */
191 2
    public function getPort(): ?int
192
    {
193 2
        return $this->port;
194
    }
195
196
    /**
197
     * @param int $port
198
     */
199 1
    public function setPort(int $port): void
200
    {
201 1
        $this->port = $port;
202 1
    }
203
204
    /**
205
     * @return string|null
206
     */
207 2
    public function getUrl(): ?string
208
    {
209 2
        return $this->url;
210
    }
211
212
    /**
213
     * @param string $url
214
     */
215 1
    public function setUrl(string $url): void
216
    {
217 1
        $this->url = $url;
218 1
    }
219
}
220