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=eff76cb45c49057c11e4b3e79515745b9d86a605;hp=c029e748b74988b90f62754984a46f7cc4fb0681;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php index c029e748b..eff76cb45 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -1,11 +1,12 @@ -name = $name; } @@ -35,7 +36,7 @@ class Param extends PhpParser\BuilderAbstract * @return $this The builder instance (for fluid interface) */ public function setDefault($value) { - $this->default = $this->normalizeValue($value); + $this->default = BuilderHelpers::normalizeValue($value); return $this; } @@ -48,8 +49,8 @@ class Param extends PhpParser\BuilderAbstract * @return $this The builder instance (for fluid interface) */ public function setTypeHint($type) { - $this->type = $this->normalizeType($type); - if ($this->type === 'void') { + $this->type = BuilderHelpers::normalizeType($type); + if ($this->type == 'void') { throw new \LogicException('Parameter type cannot be void'); } @@ -83,9 +84,10 @@ class Param extends PhpParser\BuilderAbstract * * @return Node\Param The built parameter node */ - public function getNode() { + public function getNode() : Node { return new Node\Param( - $this->name, $this->default, $this->type, $this->byRef, $this->variadic + new Node\Expr\Variable($this->name), + $this->default, $this->type, $this->byRef, $this->variadic ); } }