The world number one has reached a settlement with the World Anti-Doping Agency over two positive drugs test year.