Skip to content

Commit a598943

Browse files
Use PHPStan instead of Psalm
1 parent 12a4577 commit a598943

File tree

10 files changed

+34
-30
lines changed

10 files changed

+34
-30
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>

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![Latest Stable Version](https://poser.pugx.org/phpunit/php-text-template/v/stable.png)](https://packagist.org/packages/phpunit/php-text-template)
22
[![CI Status](https://github.com/sebastianbergmann/php-text-template/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-text-template/actions)
3-
[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/php-text-template/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/php-text-template)
43
[![codecov](https://codecov.io/gh/sebastianbergmann/php-text-template/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-text-template)
54

65
# php-text-template

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/Template.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@
2121
final class Template
2222
{
2323
/**
24-
* @psalm-var non-empty-string
24+
* @var non-empty-string
2525
*/
2626
private readonly string $template;
2727

2828
/**
29-
* @psalm-var non-empty-string
29+
* @var non-empty-string
3030
*/
3131
private readonly string $openDelimiter;
3232

3333
/**
34-
* @psalm-var non-empty-string
34+
* @var non-empty-string
3535
*/
3636
private readonly string $closeDelimiter;
3737

3838
/**
39-
* @psalm-var array<string,string>
39+
* @var array<string,string>
4040
*/
4141
private array $values = [];
4242

4343
/**
44-
* @psalm-param non-empty-string $templateFile
45-
* @psalm-param non-empty-string $openDelimiter
46-
* @psalm-param non-empty-string $closeDelimiter
44+
* @param non-empty-string $templateFile
45+
* @param non-empty-string $openDelimiter
46+
* @param non-empty-string $closeDelimiter
4747
*
4848
* @throws InvalidArgumentException
4949
*/
@@ -55,7 +55,7 @@ public function __construct(string $templateFile, string $openDelimiter = '{', s
5555
}
5656

5757
/**
58-
* @psalm-param array<string,string> $values
58+
* @param array<string,string> $values
5959
*/
6060
public function setVar(array $values, bool $merge = true): void
6161
{
@@ -95,9 +95,9 @@ public function renderTo(string $target): void
9595
}
9696

9797
/**
98-
* @psalm-param non-empty-string $file
98+
* @param non-empty-string $file
9999
*
100-
* @psalm-return non-empty-string
100+
* @return non-empty-string
101101
*
102102
* @throws InvalidArgumentException
103103
*/

tools/composer

129 KB
Binary file not shown.

tools/php-cs-fixer

420 KB
Binary file not shown.

tools/phpstan

21.9 MB
Binary file not shown.

tools/psalm

-11.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)