Completed
Push — master ( 708a27...093324 )
by Philip
24:28
created

GeneratedIntegerIdEntity   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getId() 0 4 1
A isPersisted() 0 4 1
1
<?php
2
3
namespace Dontdrinkandroot\Entity;
4
5
class GeneratedIntegerIdEntity implements IntegerIdEntityInterface
6
{
7
    /** @var int */
8
    private $id;
9
10
    public function __construct()
11
    {
12
    }
13
14
    /**
15
     * @return int
16
     */
17
    public function getId()
18
    {
19
        return $this->id;
20
    }
21
22
    /**
23
     * @return bool
24
     */
25
    public function isPersisted()
26
    {
27
        return null !== $this->id;
28
    }
29
}
30