phplrt/phplrt

View on GitHub
libs/compiler/src/Node/Statement/ConcatenationNode.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Phplrt\Compiler\Node\Statement;

/**
 * @internal This is an internal class, please do not use it in your application code.
 * @psalm-internal Phplrt\Compiler
 * @psalm-suppress PropertyNotSetInConstructor
 */
class ConcatenationNode extends Statement
{
    /**
     * @param non-empty-list<Statement> $statements
     */
    public function __construct(
        public array $statements,
    ) {}

    /**
     * @return \Traversable<non-empty-string, array<Statement>>
     */
    public function getIterator(): \Traversable
    {
        yield 'statements' => $this->statements;
    }
}