LogInfo   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 34
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUserId() 0 4 1
A getContent() 0 4 1
A getType() 0 4 1
A getClientIp() 0 4 1
A getClient() 0 4 1
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