Pergunta de entrevista da empresa Xero

Refactor the piece of code. What is dependency injection?