| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Node; |
| 4: | |
| 5: | use PhpParser\Node\Stmt\ClassConst; |
| 6: | use PhpParser\Node\Stmt\ClassLike; |
| 7: | use PhpParser\NodeAbstract; |
| 8: | use PHPStan\Node\Constant\ClassConstantFetch; |
| 9: | |
| 10: | |
| 11: | class ClassConstantsNode extends NodeAbstract implements VirtualNode |
| 12: | { |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | public function __construct(private ClassLike $class, private array $constants, private array $fetches) |
| 19: | { |
| 20: | parent::__construct($class->getAttributes()); |
| 21: | } |
| 22: | |
| 23: | public function getClass(): ClassLike |
| 24: | { |
| 25: | return $this->class; |
| 26: | } |
| 27: | |
| 28: | |
| 29: | |
| 30: | |
| 31: | public function getConstants(): array |
| 32: | { |
| 33: | return $this->constants; |
| 34: | } |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public function getFetches(): array |
| 40: | { |
| 41: | return $this->fetches; |
| 42: | } |
| 43: | |
| 44: | public function getType(): string |
| 45: | { |
| 46: | return 'PHPStan_Node_ClassConstantsNode'; |
| 47: | } |
| 48: | |
| 49: | |
| 50: | |
| 51: | |
| 52: | public function getSubNodeNames(): array |
| 53: | { |
| 54: | return []; |
| 55: | } |
| 56: | |
| 57: | } |
| 58: | |