bug #327 Fix type null for nullable type parameters not added as type (CharlotteDunois)
bug #327 Fix type null for nullable type parameters not added as type (CharlotteDunois)

This PR was merged into the 4.0-dev branch.

Discussion
----------

Fix type null for nullable type parameters not added as type

I've started using PHP 7.1 nullable types and noticed, that Sami is not able to parse them. I saw the issue #264, but it does not fix the issue, at least not for parameters.

For example `function setAvatar(?string $data)` will result in a type of `string`, and not `string|null` as expected. The PHP documentation for that element *is* `@param string|null $data`.

This PR fixes this by adding the `null` type to the type array when resolving hints.

Commits
-------

ae635f6 Fix

FriendsOfPHP/Sami,TiS/Sami,FriendsOfPHP/Sami,TiS/Sami