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
/
Node
/
Stmt
/
Trait_.php
diff --git
a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
index eed5844ae1ff55be776adde8268c78ad9a0bbba2..83980a7628a4ceca50b33bc76122084f5bc7ca3f 100644
(file)
--- a/
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
+++ b/
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
@@
-1,4
+1,4
@@
-<?php
+<?php
declare(strict_types=1);
namespace PhpParser\Node\Stmt;
namespace PhpParser\Node\Stmt;
@@
-9,18
+9,22
@@
class Trait_ extends ClassLike
/**
* Constructs a trait node.
*
/**
* Constructs a trait node.
*
- * @param string
$name
Name
+ * @param string
|Node\Identifier $name
Name
* @param array $subNodes Array of the following optional subnodes:
* 'stmts' => array(): Statements
* @param array $attributes Additional attributes
*/
* @param array $subNodes Array of the following optional subnodes:
* 'stmts' => array(): Statements
* @param array $attributes Additional attributes
*/
- public function __construct($name, array $subNodes =
array(), array $attributes = array()
) {
+ public function __construct($name, array $subNodes =
[], array $attributes = []
) {
parent::__construct($attributes);
parent::__construct($attributes);
- $this->name = $name;
- $this->stmts =
isset($subNodes['stmts']) ? $subNodes['stmts'] : array()
;
+ $this->name =
\is_string($name) ? new Node\Identifier($name) :
$name;
+ $this->stmts =
$subNodes['stmts'] ?? []
;
}
}
- public function getSubNodeNames() {
- return array('name', 'stmts');
+ public function getSubNodeNames() : array {
+ return ['name', 'stmts'];
+ }
+
+ public function getType() : string {
+ return 'Stmt_Trait';
}
}
}
}