Passed
Push — master ( d59596...9d2c64 )
by Adrien
27:21 queued 13:39
created

Configuration   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 25%

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 36
ccs 2
cts 8
cp 0.25
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A __construct() 0 4 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 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
    ) {
26 3
    }
27
28
    /**
29
     * Get key.
30
     */
31
    public function getKey(): string
32
    {
33
        return $this->key;
34
    }
35
36
    /**
37
     * Set value.
38
     */
39
    public function setValue(string $value): void
40
    {
41
        $this->value = $value;
42
    }
43
44
    /**
45
     * Get value.
46
     */
47
    public function getValue(): string
48
    {
49
        return $this->value;
50
    }
51
}
52