Refactored HHVM-incompatible generator syntax into a detail class.