From 26d1c5fa50cd930a796c7fe8f60f7a73f2d8d3af Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 16 Jan 2024 19:19:36 +0100 Subject: [PATCH] Add native property types in Token Signed-off-by: Kamil Tekiela --- psalm-baseline.xml | 16 ++-------------- src/Token.php | 12 +++--------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 774675ab..1443d46f 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -178,10 +178,6 @@ values]]> - - keyword]]> - keyword]]> - dest]]> @@ -431,9 +427,9 @@ expr]]> - + value === ',']]> - + @@ -630,7 +626,6 @@ tokens]]> - self::STATEMENT_PARSERS idx]]> @@ -783,9 +778,6 @@ column]]> table]]> - - keyword]]> - from]]> @@ -1095,10 +1087,6 @@ keyword]]]> keyword]]]> - - keyword]]]> - keyword]]]> - $expr $expressions[] diff --git a/src/Token.php b/src/Token.php index 08817716..7e9f0271 100644 --- a/src/Token.php +++ b/src/Token.php @@ -69,17 +69,13 @@ class Token /** * The value this token contains (i.e. token after some evaluation). - * - * @var mixed */ - public $value; + public mixed $value; /** * The keyword value this token contains, always uppercase. - * - * @var mixed|string|null */ - public $keyword = null; + public mixed $keyword = null; /** * The type of this token. @@ -96,10 +92,8 @@ class Token * * The position is counted in chars, not bytes, so you should * use mb_* functions to properly handle utf-8 multibyte chars. - * - * @var int|null */ - public $position; + public int|null $position = null; /** * @param string $token the value of the token