Passed
Pull Request — development (#682)
by Nick
07:18
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
/**
10
 * Class FieldNoteEntity
11
 *
12
 * @package Oc\FieldNotes\Persistence
0 ignored issues
show
introduced by
Unexpected tag type @package in doc block
Loading history...
13
 */
14
class FieldNoteEntity extends AbstractEntity
15
{
16
    /**
17
     * @var int
18
     */
19
    public $id;
20
21
    /**
22
     * @var int
23
     */
24
    public $userId;
25
26
    /**
27
     * @var int
28
     */
29
    public $geocacheId;
30
31
    /**
32
     * @var int
33
     */
34
    public $type;
35
36
    /**
37
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
38
     */
39
    public $date;
40
41
    /**
42
     * @var string
43
     */
44
    public $text;
45
46
    /**
47
     * @var GeoCacheEntity
0 ignored issues
show
introduced by
GeoCacheEntity => \Oc\GeoCache\Persistence\GeoCache\GeoCacheEntity
Loading history...
48
     */
49
    public $geoCache;
50
51
    /**
52
     * Checks if the entity is new.
53
     *
54
     * @return bool
55
     */
56
    public function isNew()
57
    {
58
        return $this->id === null;
59
    }
60
}
61