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




``` Hack
public function withFormatter(
  Facebook\HackCodegen\ICodegenFormatter $formatter,
): this;
```




## Parameters




- [` Facebook\HackCodegen\ICodegenFormatter `](<interface.Facebook.HackCodegen.ICodegenFormatter.md>)`` $formatter ``




## Returns




+ ` this `