IdAwareEntity::setGeneratedId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 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