Total Complexity | 5 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class OtpGenerationEvent extends AbstractEvent |
||
10 | { |
||
11 | /** |
||
12 | * @var string $otp |
||
13 | */ |
||
14 | protected $otp = ''; |
||
15 | |||
16 | /** |
||
17 | * @var bool $isModified |
||
18 | */ |
||
19 | protected $isModified = false; |
||
20 | |||
21 | /** |
||
22 | * @var Address $address |
||
23 | */ |
||
24 | protected $address; |
||
25 | |||
26 | 5 | public function __construct(string $name, Address $address) |
|
27 | { |
||
28 | 5 | parent::__construct($name); |
|
29 | |||
30 | 5 | $this->address = $address; |
|
31 | 5 | } |
|
32 | |||
33 | /** |
||
34 | * Get $otp |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | 1 | public function getOtp(): string |
|
39 | { |
||
40 | 1 | return $this->otp; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Set $otp |
||
45 | * |
||
46 | * @param string $otp |
||
47 | * |
||
48 | * @return self |
||
49 | */ |
||
50 | 1 | public function setOtp(string $otp): OtpGenerationEvent |
|
51 | { |
||
52 | 1 | $this->otp = $otp; |
|
53 | |||
54 | 1 | $this->isModified = true; |
|
55 | |||
56 | 1 | return $this; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * Get $isModified |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | 5 | public function isModified(): bool |
|
65 | { |
||
66 | 5 | return $this->isModified; |
|
67 | } |
||
68 | |||
69 | /** |
||
70 | * Get $address |
||
71 | * |
||
72 | * @return Address |
||
73 | */ |
||
74 | public function getAddress(): Address |
||
77 | } |
||
78 | } |
||
79 |