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