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