Passed
Pull Request — development (#682)
by Thomas
06:58
created

FieldNoteEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 47
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\FieldNotes\Persistence;
4
5
use DateTime;
6
use Oc\GeoCache\Persistence\GeoCache\GeoCacheEntity;
7
use Oc\Repository\AbstractEntity;
8
9
class FieldNoteEntity extends AbstractEntity
10
{
11
    /**
12
     * @var int
13
     */
14
    public $id;
15
16
    /**
17
     * @var int
18
     */
19
    public $userId;
20
21
    /**
22
     * @var int
23
     */
24
    public $geocacheId;
25
26
    /**
27
     * @var int
28
     */
29
    public $type;
30
31
    /**
32
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
33
     */
34
    public $date;
35
36
    /**
37
     * @var string
38
     */
39
    public $text;
40
41
    /**
42
     * @var GeoCacheEntity
0 ignored issues
show
introduced by
GeoCacheEntity => \Oc\GeoCache\Persistence\GeoCache\GeoCacheEntity
Loading history...
43
     */
44
    public $geoCache;
45
46
    /**
47
     * Checks if the entity is new.
48
     *
49
     * @return bool
50
     */
51
    public function isNew()
52
    {
53
        return $this->id === null;
54
    }
55
}
56