Closed GaryJones closed 11 years ago
For strings like {{unknown}}
, should those still go in a method, or is a property fine?
Methods are testable, and they also allow the use of other functions or methods to help set a value, which properties do not, so methods are preferred over properties.
Strings like the transient key,
{{unknown}}
and other strings used across multiple methods should be refactored into protected functions e.g.This ensures consistency, easy unit testability, and a single place to make changes if needed in the future.