Passed
Pull Request — master (#82)
by Damien
02:42
created

AuditEntry::getTransactionHash()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace DH\DoctrineAuditBundle\Reader;
4
5
class AuditEntry
6
{
7
    /**
8
     * @var int
9
     */
10
    protected $id;
11
12
    /**
13
     * @var string
14
     */
15
    protected $type;
16
17
    /**
18
     * @var string
19
     */
20
    protected $object_id;
21
22
    /**
23
     * @var string|null
24
     */
25
    protected $transaction_hash;
26
27
    /**
28
     * @var string
29
     */
30
    protected $diffs;
31
32
    /**
33
     * @var null|int|string
34
     */
35
    protected $blame_id;
36
37
    /**
38
     * @var string
39
     */
40
    protected $blame_user;
41
42
    /**
43
     * @var string
44
     */
45
    protected $blame_user_fqdn;
46
47
    /**
48
     * @var string
49
     */
50
    protected $blame_user_firewall;
51
52
    /**
53
     * @var string
54
     */
55
    protected $ip;
56
57
    /**
58
     * @var string
59
     */
60
    protected $created_at;
61
62
    public function __set($name, $value)
63
    {
64
        $this->{$name} = $value;
65
    }
66
67
    /**
68
     * Get the value of id.
69
     *
70
     * @return int
71
     */
72
    public function getId(): int
73
    {
74
        return $this->id;
75
    }
76
77
    /**
78
     * Get the value of type.
79
     *
80
     * @return string
81
     */
82
    public function getType(): string
83
    {
84
        return $this->type;
85
    }
86
87
    /**
88
     * Get the value of object_id.
89
     *
90
     * @return string
91
     */
92
    public function getObjectId(): string
93
    {
94
        return $this->object_id;
95
    }
96
97
    /**
98
     * Get the value of transaction_hash.
99
     *
100
     * @return string|null
101
     */
102
    public function getTransactionHash(): ?string
103
    {
104
        return $this->transaction_hash;
105
    }
106
107
    /**
108
     * Get the value of blame_id.
109
     *
110
     * @return null|int|string
111
     */
112
    public function getUserId()
113
    {
114
        return $this->blame_id;
115
    }
116
117
    /**
118
     * Get the value of blame_user.
119
     *
120
     * @return null|string
121
     */
122
    public function getUsername(): ?string
123
    {
124
        return $this->blame_user;
125
    }
126
127
    /**
128
     * @return null|string
129
     */
130
    public function getUserFqdn(): ?string
131
    {
132
        return $this->blame_user_fqdn;
133
    }
134
135
    /**
136
     * @return null|string
137
     */
138
    public function getUserFirewall(): ?string
139
    {
140
        return $this->blame_user_firewall;
141
    }
142
143
    /**
144
     * Get the value of ip.
145
     *
146
     * @return string
147
     */
148
    public function getIp(): ?string
149
    {
150
        return $this->ip;
151
    }
152
153
    /**
154
     * Get the value of created_at.
155
     *
156
     * @return string
157
     */
158
    public function getCreatedAt(): string
159
    {
160
        return $this->created_at;
161
    }
162
163
    /**
164
     * Get the value of created_at.
165
     *
166
     * @return array
167
     */
168
    public function getDiffs(): ?array
169
    {
170
        return json_decode($this->diffs, true);
171
    }
172
}
173