Completed
Pull Request — development (#546)
by Nick
06:21
created

BlockEntity   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\Page;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8
/**
9
 * Class BlockEntity
10
 *
11
 * @package Oc\Page
12
 */
13
class BlockEntity extends AbstractEntity
14
{
15
    /**
16
     * @var int
17
     */
18
    public $id;
19
20
    /**
21
     * @var int
22
     */
23
    public $pageId;
24
25
    /**
26
     * @var string
27
     */
28
    public $title;
29
30
    /**
31
     * @var string
32
     */
33
    public $html;
34
35
    /**
36
     * @var int
37
     */
38
    public $position;
39
40
    /**
41
     * @var DateTime
42
     */
43
    public $updatedAt;
44
45
    /**
46
     * @var bool
47
     */
48
    public $active;
49
50
    /**
51
     * Checks if the entity is new.
52
     *
53
     * @return bool
54
     */
55
    public function isNew()
56
    {
57
        return $this->id === null;
58
    }
59
}
60