martin-helmich/typo3-typoscript-parser

View on GitHub
src/Tokenizer/Preprocessing/StandardPreprocessor.php

Summary

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

namespace Helmich\TypoScriptParser\Tokenizer\Preprocessing;

/**
 * Helper class that provides the standard pre-processing behaviour
 *
 * @package Helmich\TypoScriptParser\Tokenizer\Preprocessing
 */
class StandardPreprocessor extends ProcessorChain
{
    /**
     * @psalm-param non-empty-string $eolChar
     */
    public function __construct(string $eolChar = "\n")
    {
        $this->processors = [
            new UnifyLineEndingsPreprocessor($eolChar),
            new RemoveTrailingWhitespacePreprocessor($eolChar),
        ];
    }
}