Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions tests/PHPStan/Parser/PhpDocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6988,6 +6988,23 @@
$this->assertSame('@phpstan-assert !Type $param', $assertNode->__toString());
}

/**
* @dataProvider provideLexerData
*/
public function testClosingBraceInlineTag(

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.

Check failure on line 6994 in tests/PHPStan/Parser/PhpDocParserTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1)

Method PHPStan\PhpDocParser\Parser\PhpDocParserTest::testClosingBraceInlineTag() has parameter $expectedTokens with no value type specified in iterable type array.
string $input,
array $expectedTokens,
): void {
$tokens = new TokenIterator($this->lexer->tokenize($input));
$this->assertEquals($expectedTokens, array_map(
fn ($token) => [
$token[Lexer::TYPE_OFFSET],
$token[Lexer::VALUE_OFFSET],
],
$tokens->getTokens(),
));
}

/**
* @return array<mixed>
*/
Expand Down Expand Up @@ -7664,6 +7681,32 @@
];
}

public function provideLexerData(): Iterator
{
yield ['{@link https://example.com}', [
[Lexer::TOKEN_OPEN_CURLY_BRACKET, '{'],
[Lexer::TOKEN_PHPDOC_TAG, '@link'],
[Lexer::TOKEN_HORIZONTAL_WS, ' '],
[Lexer::TOKEN_IDENTIFIER, 'https'],
[Lexer::TOKEN_COLON, ':'],
[Lexer::TOKEN_OTHER, '//example.com'],
[Lexer::TOKEN_CLOSE_CURLY_BRACKET, '}'],
[Lexer::TOKEN_END, ''],
]];

yield ['{@link https://example.com }', [
[Lexer::TOKEN_OPEN_CURLY_BRACKET, '{'],
[Lexer::TOKEN_PHPDOC_TAG, '@link'],
[Lexer::TOKEN_HORIZONTAL_WS, ' '],
[Lexer::TOKEN_IDENTIFIER, 'https'],
[Lexer::TOKEN_COLON, ':'],
[Lexer::TOKEN_OTHER, '//example.com'],
[Lexer::TOKEN_HORIZONTAL_WS, ' '],
[Lexer::TOKEN_CLOSE_CURLY_BRACKET, '}'],
[Lexer::TOKEN_END, ''],
]];
}

/**
* @dataProvider dataTextBetweenTagsBelongsToDescription
*/
Expand Down
Loading