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

PageEntity   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\Persistence;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8
/**
9
 * Class PageEntity
10
 */
11
class PageEntity extends AbstractEntity
12
{
13
    /**
14
     * @var int
15
     */
16
    public $id;
17
18
    /**
19
     * @var string
20
     */
21
    public $slug;
22
23
    /**
24
     * @var string
25
     */
26
    public $metaKeywords;
27
28
    /**
29
     * @var string
30
     */
31
    public $metaDescription;
32
33
    /**
34
     * @var string
35
     */
36
    public $metaSocial;
37
38
    /**
39
     * @var DateTime
40
     */
41
    public $updatedAt;
42
43
    /**
44
     * @var bool
45
     */
46
    public $active = true;
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