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

Configuration   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 30%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 45
ccs 3
cts 10
cp 0.3
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A __construct() 0 3 1
A getKey() 0 3 1
A setValue() 0 3 1
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