You’re right, it will generate a notice (if the code isn’t provided with a well formed link, for instance) – I’ve updated the snippet to avoid that, but please note it was just a simple example to provide a starting point for anyone wishing to make a customization along these lines.
What’s basically happening is the same function – modify_event_link() – is called whether the URL relates to the event, the organizer or the venue – hence why it supplies the same text in each case – and you can see how that is hooked up in the final 3 lines of the snippet. In your case, you could simply create two more functions to handle each special case (one for venues, one for organizers … as in Brook’s example).
Does that help?