Completed
Push — master ( 3f2c58...3eb51e )
by wen
02:00
created

LogInfo   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 41
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUserId() 0 4 1
A getTableName() 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
7
use Sco\ActionLog\Traits\HasAttributes;
8
9
class LogInfo
10
{
11
    use HasAttributes;
12
13
    public function __construct(array $attributes)
14
    {
15
        $this->setAttribute($attributes);
16
    }
17
18
    public function getUserId()
19
    {
20
        return $this->getAttribute('user_id');
21
    }
22
23
    public function getTableName()
24
    {
25
        return $this->getAttribute('table_name');
26
    }
27
28
    public function getContent()
29
    {
30
        return $this->getAttribute('content');
31
    }
32
33
    public function getType()
34
    {
35
        return $this->getAttribute('type');
36
    }
37
38
    public function getClientIp()
39
    {
40
        return $this->getAttribute('client_ip');
41
    }
42
43
    public function getClient()
44
    {
45
        return $this->getAttribute('client');
46
    }
47
48
49
}
50