From 9a8eea8a5092cfbcb19c9cf4d2858b2daba37211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Rumi=C5=84ski?= Date: Sat, 16 Dec 2023 02:30:08 +0100 Subject: [PATCH] chore: TokensAnalyzer - string-enum for better typehinting (#7571) --- src/Tokenizer/TokensAnalyzer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Tokenizer/TokensAnalyzer.php b/src/Tokenizer/TokensAnalyzer.php index 42cde5f85bc..ea9f13dfb6a 100644 --- a/src/Tokenizer/TokensAnalyzer.php +++ b/src/Tokenizer/TokensAnalyzer.php @@ -26,6 +26,8 @@ * @author Gregor Harlan * * @internal + * + * @phpstan-type ClassyElementType 'case'|'const'|'method'|'property'|'trait_import' */ final class TokensAnalyzer { @@ -44,7 +46,7 @@ public function __construct(Tokens $tokens) /** * Get indices of methods and properties in classy code (classes, interfaces and traits). * - * @return array + * @return array */ public function getClassyElements(): array { @@ -724,7 +726,7 @@ public function isSuperGlobal(int $index): bool * * @param int $classIndex classy index * - * @return array{int, array} + * @return array{int, array} */ private function findClassyElements(int $classIndex, int $index): array {