From the Messenger of Allah ﷺ, he mentioned several hadith, among them that he said, "Straighten the rows in prayer, for straightening the rows is part of the excellence of prayer."
حدثنا محمد بن رافع حدثنا عبد الرزاق حدثنا معمر عن همام بن منبه قال هذا ما حدثنا
عن رسول الله ﷺ فذكر أحاديث منها وقال أقيموا الصف في الصلاة فإن إقامة الصف من حسن الصلاة