The UK government has shared the residency requirements foreigners working in the country must meet before applying for indefinite leave to remain.