Skip to content

Commit

Permalink
use php8 compatible version of psalm for static analysis, and fix som…
Browse files Browse the repository at this point in the history
…e errors
  • Loading branch information
shieldo committed Dec 22, 2024
1 parent c04546a commit 9378e9e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5.0",
"vimeo/psalm": "^4.3.2",
"vimeo/psalm": "dev-php84",
"squizlabs/php_codesniffer": "^3.5.8",
"ext-json": "*",
"phpbench/phpbench": "^1.0"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GromNaN/psalm"
}
]
}
3 changes: 3 additions & 0 deletions src/Kdl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Kdl\Kdl;

/**
* @psalm-api
*/
final class Kdl
{
/**
Expand Down
1 change: 0 additions & 1 deletion src/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
*/
class ParseException extends \InvalidArgumentException
{

}
4 changes: 2 additions & 2 deletions src/grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Parsica\Parsica\Parser;

use function Parsica\Parsica\{andPred,
use function Parsica\Parsica\{
anySingleBut,
assemble,
atLeastOne,
Expand Down Expand Up @@ -153,7 +153,7 @@ function nodeSpace(): Parser
return memo(
__FUNCTION__,
fn() => either(assemble(zeroOrMore(ws()), escline(), zeroOrMore(ws())), atLeastOne(ws()))
->map(fn($x) => null)
->map(fn($_x) => null)
->label('node-space')
);
}
Expand Down

0 comments on commit 9378e9e

Please sign in to comment.