1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /** |
||
6 | * @copyright Copyright (c) 2016 Lukas Reschke <[email protected]> |
||
7 | * |
||
8 | * @author Joas Schilling <[email protected]> |
||
9 | * @author Lukas Reschke <[email protected]> |
||
10 | * @author Roeland Jago Douma <[email protected]> |
||
11 | * |
||
12 | * @license GNU AGPL version 3 or any later version |
||
13 | * |
||
14 | * This program is free software: you can redistribute it and/or modify |
||
15 | * it under the terms of the GNU Affero General Public License as |
||
16 | * published by the Free Software Foundation, either version 3 of the |
||
17 | * License, or (at your option) any later version. |
||
18 | * |
||
19 | * This program is distributed in the hope that it will be useful, |
||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
22 | * GNU Affero General Public License for more details. |
||
23 | * |
||
24 | * You should have received a copy of the GNU Affero General Public License |
||
25 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
26 | * |
||
27 | */ |
||
28 | namespace OCA\AdminAudit\Actions; |
||
29 | |||
30 | /** |
||
31 | * Class Auth logs all auth related actions |
||
32 | * |
||
33 | * @package OCA\AdminAudit\Actions |
||
34 | */ |
||
35 | class Auth extends Action { |
||
36 | public function loginAttempt(array $params): void { |
||
37 | $this->log( |
||
38 | 'Login attempt: "%s"', |
||
39 | $params, |
||
40 | [ |
||
41 | 'uid', |
||
42 | ], |
||
43 | true |
||
44 | ); |
||
45 | } |
||
46 | |||
47 | public function loginSuccessful(array $params): void { |
||
48 | $this->log( |
||
49 | 'Login successful: "%s"', |
||
50 | $params, |
||
51 | [ |
||
52 | 'uid', |
||
53 | ], |
||
54 | true |
||
55 | ); |
||
56 | } |
||
57 | |||
58 | public function logout(array $params): void { |
||
0 ignored issues
–
show
|
|||
59 | $this->log( |
||
60 | 'Logout occurred', |
||
61 | [], |
||
62 | [] |
||
63 | ); |
||
64 | } |
||
65 | } |
||
66 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.