private function validateEmail($value)
    {
        if (empty($value)) {
            throw new InvalidArgumentException('An email address is required.');
        }
        if (!$filtered = filter_var($value, FILTER_VALIDATE_EMAIL)) {
            throw new InvalidArgumentException('Invalid email address: ' . $value);
        }

        return $filtered;
    }
private function validateEmail($value)
    {
        if (empty($value)) {
            throw new InvalidArgumentException('An email address is required.');
        }
        if (!$filtered = filter_var($value, FILTER_VALIDATE_EMAIL)) {
            throw new InvalidArgumentException('Invalid email address: ' . $value);
        }

        return $filtered;
    }
private function validateEmail ( $ value ) { if ( empty ( $ value ) ) { throw new InvalidArgumentException ( 'An email address is required.' ) ; } if ( ! $ filtered = filter_var ( $ value , FILTER_VALIDATE_EMAIL ) ) { throw new InvalidArgumentException ( 'Invalid email address: ' . $ value ) ; } return $ filtered ; }
Validate an email address.

@param string $value

@throws \Symfony\Component\Console\Exception\InvalidArgumentException

@return string
Validate an email address .