Completed
Push — master ( 09bdd0...0be494 )
by Tomáš
03:57
created

Identifier::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Portiny\Doctrine\Behaviour;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Adds support for PostgreSQL strategy of generating id.
9
 */
10
trait Identifier
11
{
12
13
	/**
14
	 * @ORM\Id
15
	 * @ORM\Column(type="integer")
16
	 * @ORM\GeneratedValue(strategy="IDENTITY")
17
	 * @var int
18
	 */
19
	private $id;
20
21
22
	/**
23
	 * @return int
24
	 */
25
	final public function getId()
26
	{
27
		return $this->id;
28
	}
29
30
31
	public function __clone()
32
	{
33
		$this->id = NULL;
34
	}
35
36
}
37