Fixed Lint/DeprecatedClassMethods RuboCop offense

Paired-With: Tobi Gritschacher
Bug: 69245