Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | class U2fRegistrationSuccessEvent extends Event |
||
28 | { |
||
29 | private $user; |
||
30 | private $key; |
||
31 | |||
32 | /** |
||
33 | * Return the name of the event to use when dispatching this event. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 1 | public static function getName() |
|
38 | { |
||
39 | 1 | return 'u2f.registration.success'; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param U2fUserInterface $user The user who successfully registered a key |
||
44 | * @param U2fKeyInterface $key The securtiy key which was registered |
||
45 | */ |
||
46 | 3 | public function __construct(U2fUserInterface $user, U2fKeyInterface $key) |
|
50 | 3 | } |
|
51 | |||
52 | /** |
||
53 | * Return the user who successfully registered a new security key |
||
54 | * |
||
55 | * @return U2fUserInterface |
||
56 | */ |
||
57 | 1 | public function getUser() |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * Return the newly registered securtiy key |
||
64 | * |
||
65 | * @return U2fKeyInterface |
||
66 | */ |
||
67 | 1 | public function getKey() |
|
72 |