Skip to content

Commit

Permalink
Fix new Psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Feb 5, 2024
1 parent e74756f commit 16adbee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ on:
jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@4.0.0"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^4.11 || ^5.0"
"vimeo/psalm": "^4.11 || ^5.21"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 9 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
phpVersion="8.1"
phpVersion="8.3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="true"
>
<projectFiles>
<directory name="src"/>
Expand Down Expand Up @@ -52,6 +54,12 @@
<file name="src/Token.php" />
</errorLevel>
</MixedReturnStatement>
<PossiblyUnusedProperty>
<errorLevel type="suppress">
<!-- TODO: Cover this property in a test -->
<referencedProperty name="Doctrine\Common\Lexer\Token::$position"/>
</errorLevel>
</PossiblyUnusedProperty>
<ReferenceConstraintViolation>
<errorLevel type="suppress">
<!-- https://github.com/vimeo/psalm/issues/8891 -->
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class AbstractLexer
/**
* Composed regex for input parsing.
*
* @var string|null
* @var non-empty-string|null
*/
private $regex;

Expand Down

0 comments on commit 16adbee

Please sign in to comment.