We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Backpack\CRUD\app\Library\Auth; |
||
4 | |||
5 | use Illuminate\Http\Request; |
||
6 | use Illuminate\Http\Response; |
||
7 | |||
8 | trait ConfirmsPasswords |
||
9 | { |
||
10 | use RedirectsUsers; |
||
11 | |||
12 | /** |
||
13 | * Display the password confirmation view. |
||
14 | * |
||
15 | * @return \Illuminate\Http\Response |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | public function showConfirmForm() |
||
18 | { |
||
19 | return view('auth.passwords.confirm'); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Confirm the given user's password. |
||
24 | * |
||
25 | * @param \Illuminate\Http\Request $request |
||
26 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse |
||
0 ignored issues
–
show
|
|||
27 | */ |
||
28 | public function confirm(Request $request) |
||
29 | { |
||
30 | $request->validate($this->rules(), $this->validationErrorMessages()); |
||
31 | |||
32 | $this->resetPasswordConfirmationTimeout($request); |
||
33 | |||
34 | return $request->wantsJson() |
||
35 | ? new Response('', 204) |
||
36 | : redirect()->intended($this->redirectPath()); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Reset the password confirmation timeout. |
||
41 | * |
||
42 | * @param \Illuminate\Http\Request $request |
||
43 | * @return void |
||
44 | */ |
||
45 | protected function resetPasswordConfirmationTimeout(Request $request) |
||
46 | { |
||
47 | $request->session()->put('auth.password_confirmed_at', time()); |
||
0 ignored issues
–
show
The method
put() does not seem to exist on object<Symfony\Component...ssion\SessionInterface> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Get the password confirmation validation rules. |
||
52 | * |
||
53 | * @return array |
||
0 ignored issues
–
show
|
|||
54 | */ |
||
55 | protected function rules() |
||
56 | { |
||
57 | return [ |
||
58 | 'password' => 'required|password', |
||
59 | ]; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Get the password confirmation validation error messages. |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | protected function validationErrorMessages() |
||
68 | { |
||
69 | return []; |
||
70 | } |
||
71 | } |
||
72 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.