We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | <?php |
||
10 | trait VerifiesEmails |
||
11 | { |
||
12 | use RedirectsUsers; |
||
13 | |||
14 | /** |
||
15 | * Show the email verification notice. |
||
16 | * |
||
17 | * @param \Illuminate\Http\Request $request |
||
18 | * @return \Illuminate\Http\Response |
||
|
|||
19 | */ |
||
20 | public function show(Request $request) |
||
26 | |||
27 | /** |
||
28 | * Mark the authenticated user's email address as verified. |
||
29 | * |
||
30 | * @param \Illuminate\Http\Request $request |
||
31 | * @return \Illuminate\Http\Response |
||
32 | * |
||
33 | * @throws \Illuminate\Auth\Access\AuthorizationException |
||
34 | */ |
||
35 | public function verify(Request $request) |
||
63 | |||
64 | /** |
||
65 | * The user has been verified. |
||
66 | * |
||
67 | * @param \Illuminate\Http\Request $request |
||
68 | * @return mixed |
||
69 | */ |
||
70 | protected function verified(Request $request) |
||
74 | |||
75 | /** |
||
76 | * Resend the email verification notification. |
||
77 | * |
||
78 | * @param \Illuminate\Http\Request $request |
||
79 | * @return \Illuminate\Http\Response |
||
80 | */ |
||
81 | public function resend(Request $request) |
||
95 | } |
||
96 |
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.