The Messenger of Allah ﷺ said, "Straighten your rows, for straightening the rows is part of the perfection of the prayer."
حدثنا محمد بن بشار حدثنا يحيى بن سعيد عن شعبة ح و حدثنا نصر بن علي حدثنا أبي وبشر بن عمر قالا حدثنا شعبة عن قتادة
قال رسول الله ﷺ سووا صفوفكم فإن تسوية الصفوف من تمام الصلاة
Bukhari reported it in the chapter on adhan, section on establishing the row, and so on, hadith 433, from the hadith of Shubah with this chain. Also in the chapter on prayer, section on straightening and establishing the rows, hadith 723, and Muslim reported it, in the chapter on the completeness of prayer,