Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
LoginFailedEvent | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLogin | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
jsonSerialize | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace oat\tao\model\event; |
4 | |
5 | use JsonSerializable; |
6 | use oat\oatbox\event\Event; |
7 | |
8 | class LoginFailedEvent implements Event, JsonSerializable |
9 | { |
10 | private $login = ''; |
11 | |
12 | public function __construct($login) |
13 | { |
14 | $this->login = $login; |
15 | } |
16 | |
17 | /** |
18 | * @return string |
19 | */ |
20 | public function getLogin() |
21 | { |
22 | return $this->login; |
23 | } |
24 | |
25 | /** |
26 | * Return a unique name for this event |
27 | * |
28 | * @return string |
29 | */ |
30 | public function getName() |
31 | { |
32 | return __CLASS__; |
33 | } |
34 | |
35 | public function jsonSerialize(): array |
36 | { |
37 | return [ |
38 | 'login' => $this->getLogin() |
39 | ]; |
40 | } |
41 | } |