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




``` Hack
public function addTraits(
  Traversable<Facebook\HackCodegen\CodegenUsesTrait> $traits,
): this;
```




## Parameters




- ` Traversable<Facebook\HackCodegen\CodegenUsesTrait> $traits `




## Returns




+ ` this `