| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Node; |
| 4: | |
| 5: | use Override; |
| 6: | use PhpParser\Node\Expr; |
| 7: | use PhpParser\Node\Expr\BinaryOp\BooleanAnd; |
| 8: | use PhpParser\Node\Expr\BinaryOp\LogicalAnd; |
| 9: | use PHPStan\Analyser\Scope; |
| 10: | use PHPStan\Node\Printer\ExprPrinter; |
| 11: | use PHPStan\Turbo\ReferencedByTurboExtension; |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | #[ReferencedByTurboExtension(key: 'booleanAndNode')] |
| 17: | final class BooleanAndNode extends Expr implements VirtualNode |
| 18: | { |
| 19: | |
| 20: | public function __construct(private BooleanAnd|LogicalAnd $originalNode, private Scope $rightScope) |
| 21: | { |
| 22: | |
| 23: | $attributes = $originalNode->getAttributes(); |
| 24: | unset($attributes[ExprPrinter::ATTRIBUTE_CACHE_KEY]); |
| 25: | parent::__construct($attributes); |
| 26: | } |
| 27: | |
| 28: | public function getOriginalNode(): BooleanAnd|LogicalAnd |
| 29: | { |
| 30: | return $this->originalNode; |
| 31: | } |
| 32: | |
| 33: | public function getRightScope(): Scope |
| 34: | { |
| 35: | return $this->rightScope; |
| 36: | } |
| 37: | |
| 38: | #[Override] |
| 39: | public function getType(): string |
| 40: | { |
| 41: | return 'PHPStan_Node_BooleanAndNode'; |
| 42: | } |
| 43: | |
| 44: | |
| 45: | |
| 46: | |
| 47: | #[Override] |
| 48: | public function getSubNodeNames(): array |
| 49: | { |
| 50: | return []; |
| 51: | } |
| 52: | |
| 53: | } |
| 54: | |