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 namespace Cerbero\Auth\Pipes\Recover; |
||
6 | class Notify extends AbstractPipe { |
||
7 | |||
8 | /** |
||
9 | * Run after the handled job. |
||
10 | * |
||
11 | * @param Illuminate\Contracts\Mail\Mailer $mailer |
||
12 | * @param mixed $handled |
||
13 | * @param Cerbero\Auth\Jobs\RecoverJob $job |
||
14 | * @return mixed |
||
15 | */ |
||
16 | View Code Duplication | public function after(Mailer $mailer, $handled, $job) |
|
27 | |||
28 | } |
||
29 |