Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 2 additions & 14 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@
<PossiblyInvalidPropertyFetch>
<code><![CDATA[ArrayObj::parse($parser, $list)->values]]></code>
</PossiblyInvalidPropertyFetch>
<PossiblyNullArgument>
<code><![CDATA[$token->keyword]]></code>
<code><![CDATA[$token->keyword]]></code>
</PossiblyNullArgument>
<PossiblyNullOperand>
<code><![CDATA[$this->dest]]></code>
</PossiblyNullOperand>
Expand Down Expand Up @@ -431,9 +427,9 @@
<PossiblyNullPropertyAssignmentValue>
<code><![CDATA[$tmp->expr]]></code>
</PossiblyNullPropertyAssignmentValue>
<RedundantConditionGivenDocblockType>
<RedundantCondition>
<code><![CDATA[$token->value === ',']]></code>
</RedundantConditionGivenDocblockType>
</RedundantCondition>
</file>
<file src="src/Components/UnionKeyword.php">
<PossiblyUnusedMethod>
Expand Down Expand Up @@ -630,7 +626,6 @@
</MixedArrayOffset>
<PossiblyNullArrayOffset>
<code><![CDATA[$list->tokens]]></code>
<code>self::STATEMENT_PARSERS</code>
</PossiblyNullArrayOffset>
<PossiblyNullOperand>
<code><![CDATA[$list->idx]]></code>
Expand Down Expand Up @@ -783,9 +778,6 @@
<code><![CDATA[$fromExpr->column]]></code>
<code><![CDATA[$fromExpr->table]]></code>
</MixedPropertyFetch>
<PossiblyNullArgument>
<code><![CDATA[$token->keyword]]></code>
</PossiblyNullArgument>
<PossiblyNullIterator>
<code><![CDATA[$this->from]]></code>
</PossiblyNullIterator>
Expand Down Expand Up @@ -1095,10 +1087,6 @@
<code><![CDATA[$clauses[$token->keyword]]]></code>
<code><![CDATA[$clauses[$token->keyword]]]></code>
</MixedArrayOffset>
<MixedArrayTypeCoercion>
<code><![CDATA[$clauses[$token->keyword]]]></code>
<code><![CDATA[$clauses[$token->keyword]]]></code>
</MixedArrayTypeCoercion>
<MixedAssignment>
<code>$expr</code>
<code>$expressions[]</code>
Expand Down
12 changes: 3 additions & 9 deletions src/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down