X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FBuilder%2FParam.php;fp=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FBuilder%2FParam.php;h=184813a657cf6cab39406fc02a1715f74ed0540a;hp=eff76cb45c49057c11e4b3e79515745b9d86a605;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php index eff76cb45..184813a65 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -42,13 +42,13 @@ class Param implements PhpParser\Builder } /** - * Sets type hint for the parameter. + * Sets type for the parameter. * - * @param string|Node\Name|Node\NullableType $type Type hint to use + * @param string|Node\Name|Node\NullableType $type Parameter type * * @return $this The builder instance (for fluid interface) */ - public function setTypeHint($type) { + public function setType($type) { $this->type = BuilderHelpers::normalizeType($type); if ($this->type == 'void') { throw new \LogicException('Parameter type cannot be void'); @@ -57,6 +57,19 @@ class Param implements PhpParser\Builder return $this; } + /** + * Sets type for the parameter. + * + * @param string|Node\Name|Node\NullableType $type Parameter type + * + * @return $this The builder instance (for fluid interface) + * + * @deprecated Use setType() instead + */ + public function setTypeHint($type) { + return $this->setType($type); + } + /** * Make the parameter accept the value by reference. *