Use a for in place of array_combine and correct the code with phpcs