IPhone repair shop broke my phone

I took my iphone 5 to get my screen repaired and like a normal customer thought it would take an hour or two I come back once no its not done I come back for the 2nd time and they tell me it broke, it was working perfectly fine minus the broken screen when I arrived he asked me if I had any problems turning it off or anything with the battery and I said no and he told me that the phone won't power on and that they will get me a new one. They have gotten me a prepaid t mobile in the meantime but my question is what would you do in this situation. He even stated this is a rare thing.

As long as they are replacing your phone, they are doing the right thing