Skip to content

Commit 3ecbd42

Browse files
committed
fix
1 parent c7b413f commit 3ecbd42

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/TodoByPackageVersionRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ final class TodoByPackageVersionRule implements Rule
6161
private array $virtualPackages;
6262

6363
/**
64-
* @var array{versions: array<string, array{version: string, pretty_version: string}>}
64+
* @var array{versions: array<string, array{version: string, pretty_version?: string}>}
6565
*/
66-
private array $installedVersions = [];
66+
private array $installedVersions;
6767

6868
/**
6969
* @param array<string, string> $virtualPackages

tests/TodoByPackageVersionRuleTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,31 +59,31 @@ public static function provideErrors(): iterable
5959
],
6060
[
6161
'"phpunit/phpunit" version requirement "<11" satisfied.',
62-
15,
62+
14,
6363
],
6464
[
6565
'Invalid version constraint "<inValid.12" for package "phpunit/phpunit".',
66-
17,
66+
16,
6767
],
6868
[
6969
'"php" version requirement ">7.3" satisfied: drop this code after min-version raise.',
70-
19,
70+
18,
7171
],
7272
[
7373
'"php" version requirement ">=7" satisfied: drop this code after min-version raise.',
74-
20,
74+
19,
7575
],
7676
[
7777
'"php" version requirement ">=7" satisfied.',
78-
22,
78+
21,
7979
],
8080
[
8181
'"php" version requirement ">=7" satisfied.',
82-
23,
82+
22,
8383
],
8484
[
8585
'"php" version requirement ">=7" satisfied.',
86-
24,
86+
23,
8787
],
8888
],
8989
];

tests/data/packageVersion.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// TODO: not-installed/package:<5 this should error because package is not in composer.json
1212

1313
// TODO: phpunit/phpunit:<9
14-
// TODO: phpunit/phpunit:<10
1514
// TODO: phpunit/phpunit:<11
1615

1716
// TODO: phpunit/phpunit:<inValid.12

0 commit comments

Comments
 (0)