Completed
Pull Request — master (#8)
by Alessandro
03:43
created

LogEvent   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 0
dl 0
loc 57
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFilter() 0 4 1
A getFilterJson() 0 4 1
A setFilter() 0 4 1
A getExecutionTime() 0 4 1
A setExecutionTime() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\MongoDbBundle\Services\Loggers\Model;
6
7
/**
8
 * Class LogEvent.
9
 */
10
class LogEvent
11
{
12
    /** @var array */
13
    private $filter;
14
15
    /** @var int */
16
    private $executionTime;
17
18
    /**
19
     * LogEvent constructor.
20
     */
21
    public function __construct()
22
    {
23
        $this->filter = [];
24
        $this->executionTime = 0;
25
    }
26
27
    /**
28
     * @return array
29
     */
30
    public function getFilter(): array
31
    {
32
        return $this->filter;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getFilterJson(): string
39
    {
40
        return json_encode($this->filter);
41
    }
42
43
    /**
44
     * @param array $filter
45
     */
46
    public function setFilter(array $filter)
47
    {
48
        $this->filter = $filter;
49
    }
50
51
    /**
52
     * @return int
53
     */
54
    public function getExecutionTime(): int
55
    {
56
        return $this->executionTime;
57
    }
58
59
    /**
60
     * @param int $executionTime
61
     */
62
    public function setExecutionTime(int $executionTime)
63
    {
64
        $this->executionTime = $executionTime;
65
    }
66
}
67
68