---
layout: docs
title: format
id: interface.Facebook.HackCodegen.ICodegenFormatter.format
docid: interface.Facebook.HackCodegen.ICodegenFormatter.format
permalink: /docs/reference/interface.Facebook.HackCodegen.ICodegenFormatter.format/
---
# Facebook\\HackCodegen\\ICodegenFormatter::format()




``` Hack
public function format(
  string $code,
  string $file_name,
): string;
```




## Parameters




* ` string $code `
* ` string $file_name `




## Returns




- ` string `