Fix CollpaseFunctions for functions with headers over several lines

Example:

```
public function func
     (arg1,
     arg2)
 {

 }
```
Merge pull request #341 from Gama11/CollapseFunctionsFix

Fix CollpaseFunctions for functions with headers over several lines