1: | <?php declare(strict_types=1); |
2: | |
3: | namespace PhpParser\Node; |
4: | |
5: | class IntersectionType extends ComplexType { |
6: | /** @var (Identifier|Name)[] Types */ |
7: | public array $types; |
8: | |
9: | /** |
10: | * Constructs an intersection type. |
11: | * |
12: | * @param (Identifier|Name)[] $types Types |
13: | * @param array<string, mixed> $attributes Additional attributes |
14: | */ |
15: | public function __construct(array $types, array $attributes = []) { |
16: | $this->attributes = $attributes; |
17: | $this->types = $types; |
18: | } |
19: | |
20: | public function getSubNodeNames(): array { |
21: | return ['types']; |
22: | } |
23: | |
24: | public function getType(): string { |
25: | return 'IntersectionType'; |
26: | } |
27: | } |
28: |