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