LPS-42956 Source formatting - use single for loop