I'm not sure how to do this one
pbismad had mentioned this in another thread
5) Your methods need to return a TRUE value when they succeed. They are currently returning a NULL value upon success, which your current code will treat the same as a FALSE value.
class Login
{
private
$email,
$password;
public function validEmail($email)
{
return (filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE);
return $email;
}
public function emptyPassword($password)
{
return (empty($password) !== TRUE);
return $email;
}
}
How do I return it as true? Recommended reading would be appreciated initally I had thought something like this...
class Login
{
private
$email,
$password;
public function validEmail($email)
{
return (filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE);
return $email;
return true;
}
}
But that seems too simple to be right