Completed
Pull Request — development (#829)
by
unknown
05:04
created

GeoCacheCoordinatesEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isNew() 0 4 1
1
<?php
2
3
namespace Oc\Entity;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8
/**
9
 * Class GeoCacheCoordinatesEntity
10
 *
11
 * @package Oc\Entity
12
 */
13
class GeoCacheCoordinatesEntity extends AbstractEntity
14
{
15
    /** @var int */
16
    public $id;
17
18
    /** @var DateTime */
19
    public $dateCreated;
20
21
    /** @var int */
22
    public $cacheId;
23
24
    /** @var float */
25
    public $longitude;
26
27
    /** @var float */
28
    public $latitude;
29
30
    /** @var int */
31
    public $restoredBy;
32
33
    /** @var UserEntity */
34
    public $user;
35
36
    /**
37
     * @return bool
38
     */
39
    public function isNew() : bool
40
    {
41
        return $this->id === null;
42
    }
43
}
44