File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed
Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -2096,16 +2096,13 @@ public function testBug3546(): void
20962096 $ this ->analyse ([__DIR__ . '/data/bug-3546.php ' ], []);
20972097 }
20982098
2099+ #[RequiresPhp('>= 8.0 ' )]
20992100 public function testBug4800 (): void
21002101 {
21012102 $ this ->checkThisOnly = false ;
21022103 $ this ->checkNullables = true ;
21032104 $ this ->checkUnionTypes = true ;
21042105
2105- if (PHP_VERSION_ID < 80000 ) {
2106- $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
2107- }
2108-
21092106 $ this ->analyse ([__DIR__ . '/data/bug-4800.php ' ], [
21102107 [
21112108 'Missing parameter $bar (string) in call to method Bug4800\HelloWorld2::a(). ' ,
Original file line number Diff line number Diff line change 1515use PHPUnit \Framework \Attributes \RequiresPhp ;
1616use function array_merge ;
1717use function usort ;
18- use const PHP_VERSION_ID ;
1918
2019/**
2120 * @extends RuleTestCase<CallStaticMethodsRule>
@@ -412,14 +411,11 @@ public function testBug2164(): void
412411 ]);
413412 }
414413
414+ #[RequiresPhp('>= 8.0 ' )]
415415 public function testNamedArguments (): void
416416 {
417417 $ this ->checkThisOnly = false ;
418418
419- if (PHP_VERSION_ID < 80000 ) {
420- $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
421- }
422-
423419 $ this ->analyse ([__DIR__ . '/data/static-method-named-arguments.php ' ], [
424420 [
425421 'Missing parameter $j (int) in call to static method StaticMethodNamedArguments\Foo::doFoo(). ' ,
Original file line number Diff line number Diff line change 66use PHPStan \Reflection \PropertyReflection ;
77use PHPStan \Rules \Rule ;
88use PHPStan \Testing \RuleTestCase ;
9+ use PHPUnit \Framework \Attributes \RequiresPhp ;
910use function strpos ;
10- use const PHP_VERSION_ID ;
1111
1212/**
1313 * @extends RuleTestCase<UninitializedPropertyRule>
@@ -217,21 +217,15 @@ public function testRedeclareReadonlyProperties(): void
217217 ]);
218218 }
219219
220+ #[RequiresPhp('>= 8.4 ' )]
220221 public function testBug12336 (): void
221222 {
222- if (PHP_VERSION_ID < 80400 ) {
223- $ this ->markTestSkipped ('Test requires PHP 8.4. ' );
224- }
225-
226223 $ this ->analyse ([__DIR__ . '/data/bug-12336.php ' ], []);
227224 }
228225
226+ #[RequiresPhp('>= 8.4 ' )]
229227 public function testBug12547 (): void
230228 {
231- if (PHP_VERSION_ID < 80400 ) {
232- $ this ->markTestSkipped ('Test requires PHP 8.4. ' );
233- }
234-
235229 $ this ->analyse ([__DIR__ . '/data/bug-12547.php ' ], []);
236230 }
237231
You can’t perform that action at this time.
0 commit comments