Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlotte Dunois authored Feb 2, 2018
1 parent 63bc00b commit ae635f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sami/Parser/NodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ protected function addMethod(ClassMethodNode $node)
}

if (null !== $typeStr) {
$parameter->setHint($this->resolveHint(array(array($typeStr, false))));
$typeArr = array(array($typeStr, false));

if ($param->type instanceof NullableType) {
$typeArr[] = array('null', false);
}

$parameter->setHint($this->resolveHint($typeArr));
}

$method->addParameter($parameter);
Expand Down

0 comments on commit ae635f6

Please sign in to comment.