The method should return bool but was returning void. This commit is best viewed ignoring whitespace-only changes. Closes #23903, #23919.