Completed
Push — development ( b626b0...ff940a )
by Thomas
16s
created

BlockEntity::isNew()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Page\Persistence;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8
/**
9
 * Class BlockEntity
10
 */
11
class BlockEntity extends AbstractEntity
12
{
13
    /**
14
     * @var int
15
     */
16
    public $id;
17
18
    /**
19
     * @var int
20
     */
21
    public $pageId;
22
23
    /**
24
     * @var string
25
     */
26
    public $title;
27
28
    /**
29
     * @var string
30
     */
31
    public $html;
32
33
    /**
34
     * @var int
35
     */
36
    public $position;
37
38
    /**
39
     * @var DateTime
40
     */
41
    public $updatedAt;
42
43
    /**
44
     * @var bool
45
     */
46
    public $active;
47
48
    /**
49
     * Checks if the entity is new.
50
     *
51
     * @return bool
52
     */
53
    public function isNew()
54
    {
55
        return $this->id === null;
56
    }
57
}
58