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




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




## Parameters




+ ` string $code `
+ ` string $_file_name `




## Returns




* ` string `