Completed
Push — master ( 3d485f...407dff )
by Paweł
66:49
created

RevisionLog::setObjectId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Publisher Revision Component.
7
 *
8
 * Copyright 2017 Sourcefabric z.u. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2015 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Component\Revision\Model;
18
19
/**
20
 * Class RevisionLog.
21
 */
22
class RevisionLog implements RevisionLogInterface
23
{
24
    /**
25
     * @var RevisionInterface
26
     */
27
    protected $targetRevision;
28
29
    /**
30
     * @var RevisionInterface
31
     */
32
    protected $sourceRevision;
33
34
    /**
35
     * @var string
36
     */
37
    protected $objectType;
38
39
    /**
40
     * @var int
41
     */
42
    protected $objectId;
43
44
    /**
45
     * @var \DateTime
46
     */
47
    protected $createdAt;
48
49
    /**
50
     * @var string
51
     */
52
    protected $event;
53
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function getTargetRevision(): RevisionInterface
58
    {
59
        return $this->targetRevision;
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function setTargetRevision(RevisionInterface $targetRevision)
66
    {
67
        $this->targetRevision = $targetRevision;
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function getSourceRevision(): RevisionInterface
74
    {
75
        return $this->sourceRevision;
76
    }
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function setSourceRevision(RevisionInterface $sourceRevision)
82
    {
83
        $this->sourceRevision = $sourceRevision;
84
    }
85
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function getObjectType(): string
90
    {
91
        return $this->objectType;
92
    }
93
94
    /**
95
     * {@inheritdoc}
96
     */
97
    public function setObjectType(string $objectType)
98
    {
99
        $this->objectType = $objectType;
100
    }
101
102
    /**
103
     * {@inheritdoc}
104
     */
105
    public function getObjectId(): int
106
    {
107
        return $this->objectId;
108
    }
109
110
    /**
111
     * {@inheritdoc}
112
     */
113
    public function setObjectId(int $objectId)
114
    {
115
        $this->objectId = $objectId;
116
    }
117
118
    /**
119
     * {@inheritdoc}
120
     */
121
    public function getCreatedAt(): \DateTime
122
    {
123
        return $this->createdAt;
124
    }
125
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function setCreatedAt(\DateTime $createdAt)
130
    {
131
        $this->createdAt = $createdAt;
132
    }
133
134
    /**
135
     * {@inheritdoc}
136
     */
137
    public function getEvent(): string
138
    {
139
        return $this->event;
140
    }
141
142
    /**
143
     * {@inheritdoc}
144
     */
145
    public function setEvent(string $event)
146
    {
147
        $this->event = $event;
148
    }
149
}
150