Passed
Push — master ( a8b983...5b3176 )
by Adrien
10:48
created

Configuration::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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