IdAwareEntity   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 32
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setGeneratedId() 0 4 1
A setId() 0 6 1
A getId() 0 4 1
1
<?php
2
3
namespace Koine\Repository\Entity;
4
5
use Koine\Repository\Entity\GeneratedIdInterface;
6
use Koine\Repository\Entity\IdAwareInterface;
7
8
abstract class IdAwareEntity implements GeneratedIdInterface, IdAwareInterface
9
{
10
    /**
11
     * @param int
12
     */
13
    private $id;
14
15
    public function setGeneratedId($id)
16
    {
17
        return $this->setId($id);
18
    }
19
20
    /**
21
     * @param int $id
22
     *
23
     * @return self
24
     */
25
    public function setId($id)
26
    {
27
        $this->id = $id;
28
29
        return $this;
30
    }
31
32
    /**
33
     * @return int
34
     */
35
    public function getId()
36
    {
37
        return $this->id;
38
    }
39
}
40