Background
Currently StatusValue has some member variables exposed externally, which destroys the encapsulation of this class.
$value $success $successCount $failCount
We should access them via setter/getter.
Proposal
Protect above several member variables, and coding the corresponding setter/getter.
Benefit
- Enjoy the benefits of encapsulation.
- Reuse some code (e.g. we usually update $successCount when we update $success)
Cost
- Many things depend on these member variables and require a lot of compatibility work.