core/Group/Common/ValidatorToolkit.php
Showing 7 of 7 total issues
The class ValidatorToolkit has 14 public methods. Consider refactoring ValidatorToolkit to keep number of public methods under 10. Open
Open
class ValidatorToolkit{ public static function email($value) { $value = (string) $value;
- Read upRead up
- Exclude checks
Avoid unused parameters such as '$option'. Open
Open
public static function password($value, array $option = array())
- Read upRead up
- Exclude checks
Avoid using short method names like ValidatorToolkit::qq(). The configured minimum method name length is 3. Open
Open
public static function qq($value) { return !!preg_match('/^[1-9]\d{4,}$/', $value); }
- Read upRead up
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
Open
return !!preg_match('/^(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/', $value);
- Exclude checks
Line exceeds 120 characters; contains 250 characters Open
Open
return !!preg_match('/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/', $value);
- Exclude checks
Expected 1 newline at end of file; 0 found Open
Open
}
- Exclude checks