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