Completed
Push — master ( 2bb920...810e98 )
by Rafael
02:04
created

IdTrait::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Mero\Bundle\BaseBundle\Entity\Field;
4
5
/**
6
 * @author Rafael Mello <[email protected]>
7
 */
8
trait IdTrait
9
{
10
    /**
11
     * @var int Primary key
12
     *
13
     * @ORM\Id
14
     * @ORM\Column(type="integer")
15
     * @ORM\GeneratedValue(strategy="IDENTITY")
16
     */
17
    protected $id;
18
19
    /**
20
     * Return primary key identifier.
21
     *
22
     * @return int
23
     */
24
    public function getId()
25
    {
26
        return $this->id;
27
    }
28
29
    /**
30
     * Sets primary key identifier.
31
     *
32
     * @param int $id
33
     *
34
     * @return object
35
     */
36
    public function setId($id)
37
    {
38
        $this->id = $id;
39
40
        return $this;
41
    }
42
}
43