private function makeEnum(Clazz $type, $value) { $toReturn = new EnumValueCommand($type); $toReturn->setValue($value); return $toReturn; }