31 lines
505 B
PHP
31 lines
505 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
|
|
|
|
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
|
use function implode;
|
|
|
|
class ConstExprArrayNode implements ConstExprNode
|
|
{
|
|
|
|
use NodeAttributes;
|
|
|
|
/** @var ConstExprArrayItemNode[] */
|
|
public $items;
|
|
|
|
/**
|
|
* @param ConstExprArrayItemNode[] $items
|
|
*/
|
|
public function __construct(array $items)
|
|
{
|
|
$this->items = $items;
|
|
}
|
|
|
|
|
|
public function __toString(): string
|
|
{
|
|
return '[' . implode(', ', $this->items) . ']';
|
|
}
|
|
|
|
}
|