1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node;
4:
5: use PhpParser\Node;
6: use PhpParser\Node\Expr\Closure;
7: use PhpParser\NodeAbstract;
8: use PHPStan\Type\ClosureType;
9:
10: /** @api */
11: class InClosureNode extends NodeAbstract implements VirtualNode
12: {
13:
14: private Node\Expr\Closure $originalNode;
15:
16: public function __construct(private ClosureType $closureType, Closure $originalNode)
17: {
18: parent::__construct($originalNode->getAttributes());
19: $this->originalNode = $originalNode;
20: }
21:
22: public function getClosureType(): ClosureType
23: {
24: return $this->closureType;
25: }
26:
27: public function getOriginalNode(): Closure
28: {
29: return $this->originalNode;
30: }
31:
32: public function getType(): string
33: {
34: return 'PHPStan_Node_InClosureNode';
35: }
36:
37: /**
38: * @return string[]
39: */
40: public function getSubNodeNames(): array
41: {
42: return [];
43: }
44:
45: }
46: