| 1 | <?php |
||
| 8 | class Datas |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Check types of variables |
||
| 12 | * |
||
| 13 | * @param array $vars : Variables to check |
||
| 14 | * array(array('type' => 'monType', 'data' => 'mesData), array(...)...) |
||
| 15 | * |
||
| 16 | * @return boolean |
||
| 17 | */ |
||
| 18 | public static function checkType($vars) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Check if an email address is valid |
||
| 56 | * |
||
| 57 | * @param string $mail The email address to check |
||
| 58 | * |
||
| 59 | * @return boolean |
||
| 60 | */ |
||
| 61 | public static function checkMail($mail) |
||
| 71 | } |
||
| 72 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.