DomainObject   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setId() 0 3 1
A getId() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace BasePatterns\LayerSupertype;
6
7
class DomainObject
8
{
9
    protected int $id;
10
11 1
    public function __construct(int $id)
12
    {
13 1
        $this->id = $id;
14 1
    }
15
16 4
    public function getId(): int
17
    {
18 4
        return $this->id;
19
    }
20
21 3
    public function setId(int $id): void
22
    {
23 3
        $this->id = $id;
24 3
    }
25
}
26