Static_.php 721 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node\StaticVar;
  4. use PhpParser\Node\Stmt;
  5. class Static_ extends Stmt {
  6. /** @var StaticVar[] Variable definitions */
  7. public array $vars;
  8. /**
  9. * Constructs a static variables list node.
  10. *
  11. * @param StaticVar[] $vars Variable definitions
  12. * @param array<string, mixed> $attributes Additional attributes
  13. */
  14. public function __construct(array $vars, array $attributes = []) {
  15. $this->attributes = $attributes;
  16. $this->vars = $vars;
  17. }
  18. public function getSubNodeNames(): array {
  19. return ['vars'];
  20. }
  21. public function getType(): string {
  22. return 'Stmt_Static';
  23. }
  24. }