Updated Rector to commit 354ef50368dd5e33e2ede598a418a26c997b5a7c

354ef50368 [BetterPhpDocParser] Use str_starts_with() and str_starts_with() over str_contains() on DoctrineAnnotationDecorator (#6671)
This commit is contained in:
Tomas Votruba 2025-01-16 10:06:07 +00:00
parent 2259cc5a31
commit b6dc880669
2 changed files with 4 additions and 4 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '60857134fdd3e7eb935a721962c0866518e3471e';
public const PACKAGE_VERSION = '354ef50368dd5e33e2ede598a418a26c997b5a7c';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-01-16 07:06:47';
public const RELEASE_DATE = '2025-01-16 17:03:44';
/**
* @var int
*/

View File

@ -313,10 +313,10 @@ final class DoctrineAnnotationDecorator implements PhpDocNodeDecoratorInterface
return \true;
}
do {
if ($composedTokenIterator->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET, Lexer::TOKEN_OPEN_PARENTHESES) || \strpos($composedTokenIterator->currentTokenValue(), '(') !== \false) {
if ($composedTokenIterator->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET, Lexer::TOKEN_OPEN_PARENTHESES) || \strncmp($composedTokenIterator->currentTokenValue(), '{', \strlen('{')) === 0 || \strncmp($composedTokenIterator->currentTokenValue(), '(', \strlen('(')) === 0) {
++$openBracketCount;
}
if ($composedTokenIterator->isCurrentTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET, Lexer::TOKEN_CLOSE_PARENTHESES) || \strpos($composedTokenIterator->currentTokenValue(), '}') !== \false || \strpos($composedTokenIterator->currentTokenValue(), ')') !== \false) {
if ($composedTokenIterator->isCurrentTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET, Lexer::TOKEN_CLOSE_PARENTHESES) || \substr_compare($composedTokenIterator->currentTokenValue(), '}', -\strlen('}')) === 0 || \substr_compare($composedTokenIterator->currentTokenValue(), ')', -\strlen(')')) === 0) {
++$closeBracketCount;
}
$composedTokenIterator->next();