ReflectionParameter::getType

( excerpt from http://php.net/manual/en/reflectionparameter.gettype.php )

public function getType(): ?ReflectionType;

Gets the associated type of a parameter.

Returns

  • ?ReflectionType - Returns a ReflectionType object if a parameter type is specified, NULL otherwise.