---
layout: docs
title: addCase
id: class.Facebook.HackCodegen.HackBuilder.addCase
docid: class.Facebook.HackCodegen.HackBuilder.addCase
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilder.addCase/
---
# Facebook\\HackCodegen\\HackBuilder::addCase()




``` Hack
public function addCase<T>(
  T $case,
      IHackBuilderValueRenderer<T> $formatter,
): this;
```




## Parameters




* ` T $case `
* ` IHackBuilderValueRenderer<T> $formatter `




## Returns




- ` this `