phabel/src/RootNode.php

36 lines
599 B
PHP
Raw Normal View History

2020-08-14 14:43:29 +02:00
<?php
namespace Phabel;
use PhpParser\Node;
use PhpParser\NodeAbstract;
/**
2020-08-23 20:54:56 +02:00
* Root node.
2020-09-05 22:35:30 +02:00
*
* @author Daniil Gentili <daniil@daniil.it>
* @license MIT
2020-08-14 14:43:29 +02:00
*/
class RootNode extends NodeAbstract
{
/**
2020-08-23 20:54:56 +02:00
* Children.
2020-08-14 14:43:29 +02:00
*
* @var Node[]
*/
public $stmts = [];
public function __construct(array $stmts, array $attributes = [])
{
$this->stmts = $stmts;
parent::__construct($attributes);
}
public function getSubNodeNames(): array
{
return ['stmts'];
}
public function getType(): string
{
return 'rootNode';
}
2020-08-23 20:54:56 +02:00
}