Test Failed
Push — main ( 16fa93...92cbf8 )
by Bingo
06:44
created

UserOperationLogContext   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 10
dl 0
loc 34
rs 10
c 1
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getUserId() 0 3 1
A getEntries() 0 3 1
A getOperationId() 0 3 1
A setOperationId() 0 3 1
A setUserId() 0 3 1
A addEntry() 0 3 1
1
<?php
2
3
namespace Jabe\Engine\Impl\OpLog;
4
5
class UserOperationLogContext
6
{
7
    protected $operationId;
8
    protected $userId;
9
    protected $entries = [];
10
11
    public function getUserId(): string
12
    {
13
        return $this->userId;
14
    }
15
16
    public function setUserId(string $userId): void
17
    {
18
        $this->userId = $userId;
19
    }
20
21
    public function getOperationId(): string
22
    {
23
        return $this->operationId;
24
    }
25
26
    public function setOperationId(string $operationId): void
27
    {
28
        $this->operationId = $operationId;
29
    }
30
31
    public function addEntry(UserOperationLogContextEntry $entry): void
32
    {
33
        $this->entries[] = $entry;
34
    }
35
36
    public function getEntries(): array
37
    {
38
        return $this->entries;
39
    }
40
}
41