MDL-40711 events: Resolve conflicts with MDL-41000 and add phpdocs