Removed modules/contrib/media module to allow update to the core media module
[yaffs-website] / vendor / nikic / php-parser / lib / PhpParser / Node / Stmt / Trait_.php
1 <?php declare(strict_types=1);
2
3 namespace PhpParser\Node\Stmt;
4
5 use PhpParser\Node;
6
7 class Trait_ extends ClassLike
8 {
9     /**
10      * Constructs a trait node.
11      *
12      * @param string|Node\Identifier $name Name
13      * @param array  $subNodes   Array of the following optional subnodes:
14      *                           'stmts' => array(): Statements
15      * @param array  $attributes Additional attributes
16      */
17     public function __construct($name, array $subNodes = [], array $attributes = []) {
18         parent::__construct($attributes);
19         $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
20         $this->stmts = $subNodes['stmts'] ?? [];
21     }
22
23     public function getSubNodeNames() : array {
24         return ['name', 'stmts'];
25     }
26     
27     public function getType() : string {
28         return 'Stmt_Trait';
29     }
30 }