Extract spacing check for function in a dedicated class.