Fix missing return

| Q             | A
| ------------- | ---
| Fixed tickets | n/a
| License       | MIT

Fixed the missing return statement to return the `$treeBuilder`.