Skip to content

Commit 88e5aab

Browse files
Use PHPStan instead of Psalm
1 parent dd85397 commit 88e5aab

File tree

14 files changed

+42
-62
lines changed

14 files changed

+42
-62
lines changed

.gitattributes

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
/.gitattributes export-ignore
2-
/.gitignore export-ignore
3-
/.github export-ignore
4-
/.phive export-ignore
5-
/.php-cs-fixer.dist.php export-ignore
6-
/.psalm export-ignore
7-
/build export-ignore
8-
/build.xml export-ignore
9-
/phpunit.xml export-ignore
10-
/tests export-ignore
11-
/tools export-ignore
12-
/tools/* binary
1+
/.gitattributes export-ignore
2+
/.gitignore export-ignore
3+
/.github export-ignore
4+
/.phive export-ignore
5+
/.php-cs-fixer.dist.php export-ignore
6+
/build export-ignore
7+
/build.xml export-ignore
8+
/phpstan.neon export-ignore
9+
/phpunit.xml export-ignore
10+
/tests export-ignore
11+
/tools export-ignore
12+
/tools/* binary
1313

1414
*.php diff=php

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: Run PHP-CS-Fixer
3232
run: ./tools/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose
3333

34-
type-checker:
35-
name: Type Checker
34+
static-analysis:
35+
name: Static Analysis
3636

3737
runs-on: ubuntu-latest
3838

@@ -49,8 +49,8 @@ jobs:
4949
- name: Install dependencies with Composer
5050
run: ./tools/composer update --no-interaction --no-ansi --no-progress
5151

52-
- name: Run Psalm
53-
run: ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats
52+
- name: Run PHPStan
53+
run: ./tools/phpstan analyse --no-progress --error-format=github
5454

5555
tests:
5656
name: Tests

.phive/phars.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="php-cs-fixer" version="^3.0" installed="3.41.1" location="./tools/php-cs-fixer" copy="true"/>
4-
<phar name="psalm" version="^5.0" installed="5.18.0" location="./tools/psalm" copy="true"/>
5-
<phar name="composer" version="^2.0.3" installed="2.6.6" location="./tools/composer" copy="true"/>
3+
<phar name="php-cs-fixer" version="^3.59" installed="3.59.3" location="./tools/php-cs-fixer" copy="true"/>
4+
<phar name="composer" version="^2.7" installed="2.7.7" location="./tools/composer" copy="true"/>
5+
<phar name="phpstan" version="^1.11" installed="1.11.5" location="./tools/phpstan" copy="true"/>
66
</phive>

.psalm/baseline.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.psalm/config.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- src
5+
- tests

src/ExcludeIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
final class ExcludeIterator extends RecursiveFilterIterator
2222
{
2323
/**
24-
* @psalm-var list<string>
24+
* @var list<string>
2525
*/
2626
private array $exclude;
2727

2828
/**
29-
* @psalm-param list<string> $exclude
29+
* @param list<string> $exclude
3030
*/
3131
public function __construct(RecursiveDirectoryIterator $iterator, array $exclude)
3232
{

src/Facade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
final class Facade
2121
{
2222
/**
23-
* @psalm-param list<non-empty-string>|non-empty-string $paths
24-
* @psalm-param list<non-empty-string>|string $suffixes
25-
* @psalm-param list<non-empty-string>|string $prefixes
26-
* @psalm-param list<non-empty-string> $exclude
23+
* @param list<non-empty-string>|non-empty-string $paths
24+
* @param list<non-empty-string>|string $suffixes
25+
* @param list<non-empty-string>|string $prefixes
26+
* @param list<non-empty-string> $exclude
2727
*
28-
* @psalm-return list<non-empty-string>
28+
* @return list<non-empty-string>
2929
*/
3030
public function getFilesAsArray(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): array
3131
{

src/Factory.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
final class Factory
3030
{
3131
/**
32-
* @psalm-param list<non-empty-string>|non-empty-string $paths
33-
* @psalm-param list<non-empty-string>|string $suffixes
34-
* @psalm-param list<non-empty-string>|string $prefixes
35-
* @psalm-param list<non-empty-string> $exclude
32+
* @param list<non-empty-string>|non-empty-string $paths
33+
* @param list<non-empty-string>|string $suffixes
34+
* @param list<non-empty-string>|string $prefixes
35+
* @param list<non-empty-string> $exclude
3636
*/
3737
public function getFileIterator(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): AppendIterator
3838
{
@@ -83,9 +83,9 @@ public function getFileIterator(array|string $paths, array|string $suffixes = ''
8383
}
8484

8585
/**
86-
* @psalm-param list<non-empty-string> $paths
86+
* @param list<non-empty-string> $paths
8787
*
88-
* @psalm-return list<non-empty-string>
88+
* @return list<non-empty-string>
8989
*/
9090
private function resolveWildcards(array $paths): array
9191
{

src/Iterator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ final class Iterator extends FilterIterator
3131
private false|string $basePath;
3232

3333
/**
34-
* @psalm-var list<string>
34+
* @var list<string>
3535
*/
3636
private array $suffixes;
3737

3838
/**
39-
* @psalm-var list<string>
39+
* @var list<string>
4040
*/
4141
private array $prefixes;
4242

4343
/**
44-
* @psalm-param list<string> $suffixes
45-
* @psalm-param list<string> $prefixes
44+
* @param list<string> $suffixes
45+
* @param list<string> $prefixes
4646
*/
4747
public function __construct(string $basePath, \Iterator $iterator, array $suffixes = [], array $prefixes = [])
4848
{
@@ -94,7 +94,7 @@ private function acceptSuffix(string $filename): bool
9494
}
9595

9696
/**
97-
* @psalm-param list<string> $subStrings
97+
* @param list<string> $subStrings
9898
*/
9999
private function acceptSubString(string $filename, array $subStrings, int $type): bool
100100
{

0 commit comments

Comments
 (0)