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




``` Hack
public function addRequireClass(
  string $class,
): this;
```




## Parameters




- ` string $class `




## Returns




+ ` this `