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 |
||
| 20 | View Code Duplication | class International extends Basic |
|
| 21 | { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $email_address |
||
| 25 | * @return bool |
||
| 26 | * @throws \EventEspresso\core\domain\services\validation\email\EmailValidationException |
||
| 27 | */ |
||
| 28 | public function validate($email_address) |
||
| 45 | } |
||
| 46 | // End of file International.php |
||
| 48 |