Mercurial > hg > isophonics-drupal-site
diff vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 5fb285c0d0e3 |
children |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php Thu Feb 28 13:21:36 2019 +0000 @@ -42,13 +42,13 @@ } /** - * 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'); @@ -58,6 +58,19 @@ } /** + * 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. * * @return $this The builder instance (for fluid interface)