---
layout: docs
title: setPublic
id: trait.Facebook.HackCodegen.CodegenWithVisibility.setPublic
docid: trait.Facebook.HackCodegen.CodegenWithVisibility.setPublic
permalink: /docs/reference/trait.Facebook.HackCodegen.CodegenWithVisibility.setPublic/
---
# Facebook\\HackCodegen\\CodegenWithVisibility::setPublic()




``` Hack
public function setPublic(): this;
```




## Returns




* ` this `