Completed
Pull Request — development (#824)
by
unknown
04:40
created

GeoCacheStatusModifiedEntity::isNew()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Entity;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8
class GeoCacheStatusModifiedEntity extends AbstractEntity
9
{
10
    /** @var int */
11
    public $cacheId;
12
13
    /** @var DateTime */
14
    public $dateModified;
15
16
    /** @var int */
17
    public $oldState;
18
19
    /** @var int */
20
    public $newState;
21
22
    /** @var int */
23
    public $userId;
24
25
    /** @var UserEntity */
26
    public $user;
27
28
    /** @var GeoCacheReportStatusEntity */
29
    public $statusOld;
30
31
    /** @var GeoCacheReportStatusEntity */
32
    public $statusNew;
33
34
    /**
35
     * @return bool
36
     */
37
    public function isNew() : bool
38
    {
39
        return $this->cacheId === null;
40
    }
41
}
42