public static function validateEmail($string)
    {
        if (filter_var($string, FILTER_VALIDATE_EMAIL)) {
            return (string)$string;
        }

        throw new InvalidArgumentException(
            sprintf(
                'Provided string "%1$s" was not a valid email.',
                $string
            )
        );
    }