HasSite   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSite() 0 3 1
A getSite() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Traits;
6
7
use Application\Enum\Site;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * Trait for all objects with a site to separate them from each other.
12
 */
13
trait HasSite
14
{
15
    #[ORM\Column(type: 'enum')]
16
    private Site $site;
17
18 30
    public function getSite(): Site
19
    {
20 30
        return $this->site;
21
    }
22
23 26
    public function setSite(Site $site): void
24
    {
25 26
        $this->site = $site;
26
    }
27
}
28