Completed
Push — master ( cd00c2...c10be1 )
by Joshua
13s queued 11s
created

ContentMeta::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the -SeamsCMSDeliverySdk package.
7
 *
8
 * (c) Seams-CMS.com
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace SeamsCMS\Delivery\Model;
15
16
/**
17
 * Class ContentMeta
18
 * @package SeamsCMS\Delivery\Model
19
 */
20
class ContentMeta
21
{
22
    use HydratorTrait {
23
        fromArray as private fromArrayTrait;
24
    }
25
26
    /** @var string */
27
    private $revisionId;
28
    /** @var string */
29
    private $entryId;
30
    /** @var string */
31
    private $contentType;
32
    /** @var \DateTimeImmutable */
33
    private $createdAt;
34
    /** @var string */
35
    private $createdBy;
36
    /** @var \DateTimeImmutable */
37
    private $updatedAt;
38
    /** @var string */
39
    private $updatedBy;
40
41
42
    /**
43
     * ContentMeta constructor.
44
     *
45
     */
46
    protected function __construct()
47
    {
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getRevisionId(): string
54
    {
55
        return $this->revisionId;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getEntryId(): string
62
    {
63
        return $this->entryId;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getContentType(): string
70
    {
71
        return $this->contentType;
72
    }
73
74
    /**
75
     * @return \DateTimeImmutable
76
     */
77
    public function getCreatedAt(): \DateTimeImmutable
78
    {
79
        return $this->createdAt;
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function getCreatedBy(): string
86
    {
87
        return $this->createdBy;
88
    }
89
90
    /**
91
     * @return \DateTimeImmutable
92
     */
93
    public function getUpdatedAt(): \DateTimeImmutable
94
    {
95
        return $this->updatedAt;
96
    }
97
98
    /**
99
     * @return string
100
     */
101
    public function getUpdatedBy(): string
102
    {
103
        return $this->updatedBy;
104
    }
105
106
    /**
107
     * @param array $data
108
     * @return ContentMeta
109
     */
110
    public static function fromArray(array $data)
111
    {
112
        return self::fromArrayTrait($data);
113
    }
114
}
115