CurrentDataTrackerInput::getObjectClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Locastic\Loggastic\Model\Input;
4
5
use Symfony\Component\Serializer\Annotation\Groups;
6
7
/**
8
 * Save the latest data for each object, so it can be used to compare changes
9
 * when logging updates to activity log.
10
 */
11
class CurrentDataTrackerInput implements CurrentDataTrackerInputInterface
12
{
13
    #[Groups(["current_data_tracker"])]
14
    protected $objectId;
15
16
    #[Groups(["current_data_tracker"])]
17
    protected \DateTime $dateTime;
18
19
    #[Groups(["current_data_tracker"])]
20
    protected ?string $objectClass = null;
21
22
    #[Groups(["current_data_tracker"])]
23
    protected ?string $data = null;
24
25
    public function __construct()
26
    {
27
        $this->dateTime = new \DateTime();
28
    }
29
30
    public function setObjectId(string $objectId): void
31
    {
32
        $this->objectId = $objectId;
33
    }
34
35
    public function getObjectId(): string
36
    {
37
        return $this->objectId;
38
    }
39
40
    public function getObjectClass(): ?string
41
    {
42
        return $this->objectClass;
43
    }
44
45
    public function setObjectClass(?string $objectClass): void
46
    {
47
        $this->objectClass = $objectClass;
48
    }
49
50
    public function getData(): ?string
51
    {
52
        return $this->data;
53
    }
54
55
    public function setData(?string $data): void
56
    {
57
        $this->data = $data;
58
    }
59
60
    public function getDateTime(): \DateTime
61
    {
62
        return $this->dateTime;
63
    }
64
65
    public function setDateTime(\DateTime $dateTime): void
66
    {
67
        $this->dateTime = $dateTime;
68
    }
69
}
70