/** * @param array(PhpCss\Scanner\Token) $expectedTokens */ public function __construct(array $expectedTokens) { $this->_expectedTokens = $expectedTokens; $expectedTokenStrings = array(); foreach ($expectedTokens as $expectedToken) { $expectedTokenStrings[] = PhpCss\Scanner\Token::typeToString($expectedToken); } parent::__construct('Parse error: Unexpected end of file was found while one of ' . implode(", ", $expectedTokenStrings) . ' was expected.'); }
public function __construct(PhpCss\Scanner\Token $token, $message) { $this->_encounteredToken = $token; parent::__construct($message); }