Identifier::__clone()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php // lint >= 5.4
2
3
/**
4
 * This file is part of the Kdyby (http://www.kdyby.org)
5
 *
6
 * Copyright (c) 2008, 2012 Filip Procházka ([email protected])
7
 *
8
 * For the full copyright and license information, please view the file license.md that was distributed with this source code.
9
 */
10
11
namespace Kdyby\Doctrine\Entities\Attributes;
12
13
use Doctrine\ORM\Mapping as ORM;
14
15
16
17
/**
18
 * @author Martin Štekl <[email protected]>
19
 */
20
trait Identifier
21
{
22
23
	/**
24
	 * @ORM\Id
25
	 * @ORM\Column(type="integer")
26
	 * @ORM\GeneratedValue
27
	 * @var integer|null
28
	 */
29
	private $id;
30
31
32
33
	/**
34
	 * @return integer
35
	 */
36
	final public function getId()
37
	{
38
		return $this->id;
39
	}
40
41
42
43
	public function __clone()
44
	{
45
		$this->id = NULL;
46
	}
47
48
}
49