X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FNode%2FStmt%2FInterface_.php;fp=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FNode%2FStmt%2FInterface_.php;h=39049aae7a3f02e2e3a848ccb8f09fd4bb31633d;hp=efb5891fcc8a078bdc91988de3f069153410e9c4;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php index efb5891fc..39049aae7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -1,4 +1,4 @@ - array(): Name of extended interfaces * '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); - $this->name = $name; - $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array(); - $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->extends = $subNodes['extends'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() { - return array('name', 'extends', 'stmts'); + public function getSubNodeNames() : array { + return ['name', 'extends', 'stmts']; + } + + public function getType() : string { + return 'Stmt_Interface'; } }