LogInfo::getClientIp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
4
namespace Sco\ActionLog;
5
6
use Sco\Attributes\HasAttributesTrait;
7
8
class LogInfo
9
{
10
    use HasAttributesTrait;
11
12
    public function __construct(array $attributes)
13
    {
14
        $this->setAttribute($attributes);
15
    }
16
17
    public function getUserId()
18
    {
19
        return $this->getAttribute('user_id');
20
    }
21
22
    public function getContent()
23
    {
24
        return $this->getAttribute('content');
25
    }
26
27
    public function getType()
28
    {
29
        return $this->getAttribute('type');
30
    }
31
32
    public function getClientIp()
33
    {
34
        return $this->getAttribute('client_ip');
35
    }
36
37
    public function getClient()
38
    {
39
        return $this->getAttribute('client');
40
    }
41
}
42