projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website]
/
vendor
/
nikic
/
php-parser
/
lib
/
PhpParser
/
Builder
/
Param.php
diff --git
a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
index c029e748b74988b90f62754984a46f7cc4fb0681..eff76cb45c49057c11e4b3e79515745b9d86a605 100644
(file)
--- a/
vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
+++ b/
vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
@@
-1,11
+1,12
@@
-<?php
+<?php
declare(strict_types=1);
namespace PhpParser\Builder;
use PhpParser;
namespace PhpParser\Builder;
use PhpParser;
+use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node;
-class Param
extends PhpParser\BuilderAbstract
+class Param
implements PhpParser\Builder
{
protected $name;
{
protected $name;
@@
-23,7
+24,7
@@
class Param extends PhpParser\BuilderAbstract
*
* @param string $name Name of the parameter
*/
*
* @param string $name Name of the parameter
*/
- public function __construct($name) {
+ public function __construct(
string
$name) {
$this->name = $name;
}
$this->name = $name;
}
@@
-35,7
+36,7
@@
class Param extends PhpParser\BuilderAbstract
* @return $this The builder instance (for fluid interface)
*/
public function setDefault($value) {
* @return $this The builder instance (for fluid interface)
*/
public function setDefault($value) {
- $this->default =
$this->
normalizeValue($value);
+ $this->default =
BuilderHelpers::
normalizeValue($value);
return $this;
}
return $this;
}
@@
-48,8
+49,8
@@
class Param extends PhpParser\BuilderAbstract
* @return $this The builder instance (for fluid interface)
*/
public function setTypeHint($type) {
* @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');
}
throw new \LogicException('Parameter type cannot be void');
}
@@
-83,9
+84,10
@@
class Param extends PhpParser\BuilderAbstract
*
* @return Node\Param The built parameter node
*/
*
* @return Node\Param The built parameter node
*/
- public function getNode() {
+ public function getNode()
: Node
{
return new Node\Param(
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
);
}
}
);
}
}