martin-helmich/typo3-typoscript-parser

View on GitHub
src/Tokenizer/Printer/CodeTokenPrinter.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php declare(strict_types=1);

namespace Helmich\TypoScriptParser\Tokenizer\Printer;

use Helmich\TypoScriptParser\Tokenizer\TokenInterface;

class CodeTokenPrinter implements TokenPrinterInterface
{
    /**
     * @param TokenInterface[] $tokens
     * @return string
     */
    public function printTokenStream(array $tokens): string
    {
        $content = '';

        foreach ($tokens as $token) {
            $content .= $token->getValue();
        }

        return $content;
    }
}