Adds snippet for detectEnvironment()