IdTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 19
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace Fousky\Traits\Id;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @author Lukáš Brzák <[email protected]>
9
 */
10
trait IdTrait
11
{
12
    /**
13
     * @var int|null
14
     *
15
     * @ORM\Id()
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     * @ORM\Column(name="id", type="integer")
18
     */
19
    protected $id;
20
21
    /**
22
     * @return int|null
23
     */
24
    public function getId(): ?int
25
    {
26
        return $this->id;
27
    }
28
}
29