IdTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Axstrad library.
5
 *
6
 * (c) Dan Kempster <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @copyright 2014-2015 Dan Kempster <[email protected]>
12
 */
13
14
namespace Axstrad\Common\Entity;
15
16
/**
17
 * Axstrad\Common\Entity\IdTrait
18
 *
19
 * Class IdTrait
20
 *
21
 * @package Axstrad\Common\Entity
22
 */
23
trait IdTrait
24
{
25
    /**
26
     * @ORM\Column(name="id", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue(strategy="AUTO")
29
     * @var null|integer
30
     */
31
    protected $id;
32
33
    /**
34
     * Get the entity's unique ID.
35
     *
36
     * @return null|integer Before the entity is persisted null is return. Then
37
     *         after, it's integer ID is returned.
38
     */
39
    public function getId()
40
    {
41
        return $this->id;
42
    }
43
}
44