Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | class U2fRegistrationFailureEvent extends Event |
||
27 | { |
||
28 | private $user; |
||
29 | private $error; |
||
30 | |||
31 | /** |
||
32 | * Return the name of the event to use when dispatching this event. |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | 1 | public static function getName() |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param U2fUserInterface $user The user who failed to register a key |
||
43 | * @param \Exception $error The exception which triggered the failure |
||
44 | */ |
||
45 | 3 | public function __construct(U2fUserInterface $user, \Exception $error) |
|
46 | { |
||
47 | 3 | $this->user = $user; |
|
48 | 3 | $this->error = $error; |
|
49 | 3 | } |
|
50 | |||
51 | /** |
||
52 | * Return the user who failed to register a key. |
||
53 | * |
||
54 | * @return U2fUserInterface |
||
55 | */ |
||
56 | 1 | public function getUser() |
|
59 | } |
||
60 | |||
61 | /** |
||
62 | * Return the exception which triggered the failure |
||
63 | * |
||
64 | * @return \Exception |
||
65 | */ |
||
66 | 1 | public function getError() |
|
71 |