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

GeoCacheAdoptionsEntity::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
/**
9
 * Class GeoCacheAdoptionsEntity
10
 *
11
 * @package Oc\Entity
12
 */
13
class GeoCacheAdoptionsEntity extends AbstractEntity
14
{
15
    /** @var int */
16
    public $id;
17
18
    /** @var int */
19
    public $cacheId;
20
21
    /** @var DateTime */
22
    public $date;
23
24
    /** @var int */
25
    public $fromUserId;
26
27
    /** @var int */
28
    public $toUserId;
29
30
    /** @var UserEntity */
31
    public $fromUser;
32
33
    /** @var UserEntity */
34
    public $toUser;
35
36
    /**
37
     * @return bool
38
     */
39
    public function isNew() : bool
40
    {
41
        return $this->id === null;
42
    }
43
}
44