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




``` Hack
public function addMethod(
  Facebook\HackCodegen\CodegenMethod $method,
): this;
```




## Parameters




* [` Facebook\HackCodegen\CodegenMethod `](<class.Facebook.HackCodegen.CodegenMethod.md>)`` $method ``




## Returns




- ` this `