Configuration::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 0
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Model;
6
7
use Application\Repository\ConfigurationRepository;
8
use Doctrine\ORM\Mapping as ORM;
9
use Ecodev\Felix\Model\Traits\HasDescription;
10
11
/**
12
 * Configuration.
13
 */
14
#[ORM\Entity(ConfigurationRepository::class)]
15
class Configuration extends AbstractModel
16
{
17
    use HasDescription;
18
19
    #[ORM\Column(type: 'text')]
20
    private string $value = '';
21
22 3
    public function __construct(
23
        #[ORM\Column(name: '`key`', type: 'string', length: 191, unique: true)]
24
        private string $key = '',
25 3
    ) {}
26
27
    /**
28
     * Get key.
29
     */
30
    public function getKey(): string
31
    {
32
        return $this->key;
33
    }
34
35
    /**
36
     * Set value.
37
     */
38
    public function setValue(string $value): void
39
    {
40
        $this->value = $value;
41
    }
42
43
    /**
44
     * Get value.
45
     */
46
    public function getValue(): string
47
    {
48
        return $this->value;
49
    }
50
}
51