Safe/backward-compat code formatting update to prevent deprecation notices.
See https://github.com/civicrm/civicrm-core/pull/29173