Re: [RFC] ReflectionParameter::hasTypehint() / getTypehintText()

From: Date: Fri, 30 May 2014 18:50:05 +0000
Subject: Re: [RFC] ReflectionParameter::hasTypehint() / getTypehintText()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-74661@lists.php.net to get a copy of this message
On Thu, May 29, 2014 at 10:06 PM, Adam Harvey <aharvey@php.net> wrote: > I'd prefer NULL to indicate the complete absence of a type hint too — > it ends up as an empty string if it's used in that context regardless, > but the changed type is useful. I don't feel strongly enough about > this that it would affect my vote, though. > The current version of the RFC makes this point moot. hasTypeAnnotation() would return false, while getTypeAnnotation() would return NULL (as opposed to a ReflectionTypeAnnotation instance) The new equivalent to $rp->getTypehintText() is now (string)$rp->getTypeAnnotation() -Sara

« previous php.internals (#74661) next »