diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 8e7db399d3..98ea9d3366 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -61,8 +61,7 @@ public function addParams(array $params) { /** * Sets the return type for PHP 7. * - * @param string|Node\Name|Node\NullableType $type One of array, callable, string, int, float, - * bool, iterable, or a class/interface name. + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 90bbb6036b..de9aae7e5e 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -47,7 +47,7 @@ public function setDefault($value) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\ComplexType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) */ @@ -63,7 +63,7 @@ public function setType($type) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\ComplexType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) * diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 90ee4b0ba8..68e318565e 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -7,8 +7,8 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\NullableType; use PhpParser\Node\Stmt; +use PhpParser\Node\ComplexType; class Property implements PhpParser\Builder { @@ -119,7 +119,7 @@ public function setDocComment($docComment) { /** * Sets the property type for PHP 7.4+. * - * @param string|Name|NullableType|Identifier $type + * @param string|Name|Identifier|ComplexType $type * * @return $this */ diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index c0e3fbd764..2f0e912739 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -5,7 +5,6 @@ use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -use PhpParser\Node\IntersectionType; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar;