Passed
Push — master ( 9aa048...898b5e )
by Mattia
04:05
created

UsernameChangeEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUuid() 0 3 1
A getPreviousName() 0 3 1
A getNewName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Minepic\Events\Account;
6
7
use Minepic\Events\Event;
8
9
class UsernameChangeEvent extends Event
10
{
11
    /**
12
     * @var string
13
     */
14
    private string $uuid;
15
    /**
16
     * @var string
17
     */
18
    private string $previousName;
19
    /**
20
     * @var string
21
     */
22
    private string $newName;
23
24
    public function __construct(string $uuid, string $previousName, string $newName)
25
    {
26
        $this->uuid = $uuid;
27
        $this->previousName = $previousName;
28
        $this->newName = $newName;
29
    }
30
31
    public function getUuid(): string
32
    {
33
        return $this->uuid;
34
    }
35
36
    public function getPreviousName(): string
37
    {
38
        return $this->previousName;
39
    }
40
41
    public function getNewName(): string
42
    {
43
        return $this->newName;
44
    }
45
}
46