Skip to content

Commit ff31c42

Browse files
Use PHPStan instead of Psalm
1 parent e8331ed commit ff31c42

File tree

15 files changed

+28
-49
lines changed

15 files changed

+28
-49
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.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![Latest Stable Version](https://poser.pugx.org/phpunit/php-timer/v/stable.png)](https://packagist.org/packages/phpunit/php-timer)
44
[![CI Status](https://github.com/sebastianbergmann/php-timer/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-timer/actions)
5-
[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/php-timer/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/php-timer)
65
[![codecov](https://codecov.io/gh/sebastianbergmann/php-timer/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-timer)
76

87
Utility class for timing things, factored out of PHPUnit into a stand-alone component.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use function sprintf;
1414

1515
/**
16-
* @psalm-immutable
16+
* @immutable
1717
*/
1818
final readonly class Duration
1919
{

src/ResourceUsageFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final class ResourceUsageFormatter
1818
{
1919
/**
20-
* @psalm-var array<string,int>
20+
* @var array<string,int>
2121
*/
2222
private const SIZES = [
2323
'GB' => 1073741824,

src/Timer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
final class Timer
1616
{
1717
/**
18-
* @psalm-var list<float>
18+
* @var list<float>
1919
*/
2020
private array $startTimes = [];
2121

0 commit comments

Comments
 (0)