Skip to content

Commit

Permalink
Ignore Psalm errors that cannot be fixed on PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Jul 13, 2024
1 parent ba7456e commit 8f141db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,12 @@
<file name="tests/AbstractLexerTest.php" />
</errorLevel>
</RedundantConditionGivenDocblockType>
<MissingClassConstType>
<errorLevel type="suppress">
<!-- cannot fix that because we support PHP 8.1+ -->
<file name="tests/ConcreteLexer.php" />
<file name="tests/AbstractLexerTest.php" />
</errorLevel>
</MissingClassConstType>
</issueHandlers>
</psalm>
8 changes: 4 additions & 4 deletions tests/AbstractLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ public function testMarkerAnnotationLocaleTr(): void
public function testCanTokenizeFloatValue(): void
{
$lexer = new /** @template-extends AbstractLexer<int, string|int|float|bool> */ class () extends AbstractLexer {
public const T_NONE = 1;
public const T_INTEGER = 2;
public const T_FLOAT = 4;
public const T_BOOL = 4;
final public const T_NONE = 1;
final public const T_INTEGER = 2;
final public const T_FLOAT = 4;
final public const T_BOOL = 4;

protected function getType(string|int|float|bool &$value): int
{
Expand Down

0 comments on commit 8f141db

Please sign in to comment.