Page::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 4
1
<?php
2
3
/**
4
 * This file is part of the Setup package.
5
 *
6
 * (c) Sitewards GmbH
7
 */
8
9
namespace Sitewards\Setup\Domain\Page;
10
11
use JMS\Serializer\Annotation\Type;
12
13
final class Page implements PageInterface
14
{
15
    /**
16
     * @var string
17
     *
18
     * @Type("string")
19
     */
20
    private $identifier;
21
22
    /**
23
     * @var string
24
     *
25
     * @Type("string")
26
     */
27
    private $title;
28
29
    /**
30
     * @var string
31
     *
32
     * @Type("string")
33
     */
34
    private $content;
35
36
    /**
37
     * @var bool
38
     *
39
     * @Type("boolean")
40
     */
41
    private $active;
42
43
    /**
44
     * @param string $identifier
45
     * @param string $title
46
     * @param string $content
47
     * @param boolean $active
48
     */
49
    public function __construct(
50
        $identifier,
51
        $title,
52
        $content,
53
        $active
54
    )
55
    {
56
        $this->identifier = $identifier;
57
        $this->title      = $title;
58
        $this->content    = $content;
59
        $this->active     = $active;
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function getIdentifier()
66
    {
67
        return $this->identifier;
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function getTitle()
74
    {
75
        return $this->title;
76
    }
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function getContent()
82
    {
83
        return $this->content;
84
    }
85
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function getActive()
90
    {
91
        return $this->active;
92
    }
93
}
94