Completed
Push — master ( c28fba...9b84d0 )
by Tim
15s queued 11s
created

SlugSuffixGenerationEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 63
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUniqueRegisterKey() 0 4 1
A getRecord() 0 4 1
A getSlug() 0 4 1
A setSlug() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace HDNET\Calendarize\Event;
6
7
final class SlugSuffixGenerationEvent
8
{
9
    /**
10
     * @var string
11
     */
12
    private $uniqueRegisterKey;
13
14
    /**
15
     * @var array
16
     */
17
    private $record;
18
19
    /**
20
     * @var string
21
     */
22
    private $slug;
23
24
    /**
25
     * SlugSuffixGenerationEvent constructor.
26
     *
27
     * @param string $uniqueRegisterKey
28
     * @param array  $record
29
     * @param string $slug
30
     */
31
    public function __construct(string $uniqueRegisterKey, array $record, string $slug)
32
    {
33
        $this->uniqueRegisterKey = $uniqueRegisterKey;
34
        $this->record = $record;
35
        $this->slug = $slug;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getUniqueRegisterKey(): string
42
    {
43
        return $this->uniqueRegisterKey;
44
    }
45
46
    /**
47
     * @return array
48
     */
49
    public function getRecord(): array
50
    {
51
        return $this->record;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getSlug(): string
58
    {
59
        return $this->slug;
60
    }
61
62
    /**
63
     * @param string $slug
64
     */
65
    public function setSlug(string $slug): void
66
    {
67
        $this->slug = $slug;
68
    }
69
}
70