Skip to content

Commit c515359

Browse files
committed
covariant
1 parent 73cab33 commit c515359

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

generate-class-reference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
];
4040

4141
/**
42-
* @param ReflectionClass<object> $class
42+
* @param ReflectionClass<covariant object> $class
4343
* @param array{constants?: bool, props?: bool, methods?: bool} $options
4444
*
4545
* @throws ExceptionInterface

phpstan/include-by-php-version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
$includes = [];
44

55
$phpversion = phpversion();
6-
if (version_compare($phpversion, '8.4', '>=')) {
7-
$includes[] = __DIR__ . '/php-at-least-8.4.neon';
8-
}
96
if (version_compare($phpversion, '8.2', '>=')) {
107
$includes[] = __DIR__ . '/php-at-least-8.2.neon';
118
}
9+
if (version_compare($phpversion, '8.4', '<')) {
10+
$includes[] = __DIR__ . '/php-below-8.4.neon';
11+
}
1212
if (version_compare($phpversion, '8.2', '<')) {
1313
$includes[] = __DIR__ . '/php-below-8.2.neon';
1414
}

phpstan/php-at-least-8.4.neon

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

phpstan/php-below-8.4.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Call\-site variance of covariant object in generic type ReflectionClass\<covariant object\> in PHPDoc tag @param for parameter \$class is redundant, template type T of object of class ReflectionClass has the same variance\.$#'
5+
identifier: generics.callSiteVarianceRedundant
6+
count: 1
7+
path: ../generate-class-reference.php

0 commit comments

Comments
 (0)