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

Identifier   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A __clone() 0 4 1
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