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: /**
11: * @api
12: */
13: final class InClosureNode extends NodeAbstract implements VirtualNode
14: {
15:
16: private Node\Expr\Closure $originalNode;
17:
18: public function __construct(private ClosureType $closureType, Closure $originalNode)
19: {
20: parent::__construct($originalNode->getAttributes());
21: $this->originalNode = $originalNode;
22: }
23:
24: public function getClosureType(): ClosureType
25: {
26: return $this->closureType;
27: }
28:
29: public function getOriginalNode(): Closure
30: {
31: return $this->originalNode;
32: }
33:
34: public function getType(): string
35: {
36: return 'PHPStan_Node_InClosureNode';
37: }
38:
39: /**
40: * @return string[]
41: */
42: public function getSubNodeNames(): array
43: {
44: return [];
45: }
46:
47: }
48: