Passed
Push — master ( 1d5fb4...e5c3c4 )
by Sam
06:33 queued 01:55
created

Configuration   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 14.29%

Importance

Changes 0
Metric Value
wmc 4
eloc 6
dl 0
loc 39
ccs 1
cts 7
cp 0.1429
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A getKey() 0 3 1
A setValue() 0 3 1
A __construct() 0 6 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
     * @ORM\Column(type="text")
21
     */
22
    private string $value = '';
23
24 3
    public function __construct(
25
        /**
26
         * @ORM\Column(name="`key`", type="string", length=191, unique=true)
27
         */
28
        private string $key = ''
29
    ) {
30
    }
31
32
    /**
33
     * Get key.
34
     */
35
    public function getKey(): string
36
    {
37
        return $this->key;
38
    }
39
40
    /**
41
     * Set value.
42
     */
43
    public function setValue(string $value): void
44
    {
45
        $this->value = $value;
46
    }
47
48
    /**
49
     * Get value.
50
     */
51
    public function getValue(): string
52
    {
53
        return $this->value;
54
    }
55
}
56