private function validate($email): void {
    if(filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
      throw new InvalidArgumentException('Expected email address, but got [' . var_export($email, true) . '] instead');
    }
  }
private function validate($email): void {
    if(filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
      throw new InvalidArgumentException('Expected email address, but got [' . var_export($email, true) . '] instead');
    }
  }
private function validate ( $ email ) : void { if ( filter_var ( $ email , FILTER_VALIDATE_EMAIL ) === false ) { throw new InvalidArgumentException ( 'Expected email address, but got [' . var_export ( $ email , true ) . '] instead' ) ; } }
Ensures the valid passed in is a valid email

@throws  InvalidArgumentException  If the value is not a valid email

@param  string  $email  The value to validate

@return  void
Ensures the valid passed in is a valid email