2
2
3
3
namespace PHPStan \Rules \Classes ;
4
4
5
- use PHPStan \Php \PhpVersion ;
6
5
use PHPStan \Rules \ClassCaseSensitivityCheck ;
7
6
use PHPStan \Rules \ClassForbiddenNameCheck ;
8
7
use PHPStan \Rules \ClassNameCheck ;
@@ -26,7 +25,7 @@ protected function getRule(): Rule
26
25
$ reflectionProvider = $ this ->createReflectionProvider ();
27
26
return new InstantiationRule (
28
27
$ reflectionProvider ,
29
- new FunctionCallParametersCheck (new RuleLevelHelper ($ reflectionProvider , true , false , true , false , false , false ), new NullsafeCheck (), new PhpVersion ( 80000 ), new UnresolvableTypeHelper (), new PropertyReflectionFinder (), true , true , true , true ),
28
+ new FunctionCallParametersCheck (new RuleLevelHelper ($ reflectionProvider , true , false , true , false , false , false ), new NullsafeCheck (), new UnresolvableTypeHelper (), new PropertyReflectionFinder (), true , true , true , true ),
30
29
new ClassNameCheck (
31
30
new ClassCaseSensitivityCheck ($ reflectionProvider , true ),
32
31
new ClassForbiddenNameCheck (self ::getContainer ()),
@@ -290,6 +289,10 @@ public function testBug4056(): void
290
289
291
290
public function testNamedArguments (): void
292
291
{
292
+ if (PHP_VERSION_ID < 80000 ) {
293
+ $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
294
+ }
295
+
293
296
$ this ->analyse ([__DIR__ . '/data/instantiation-named-arguments.php ' ], [
294
297
[
295
298
'Missing parameter $j (int) in call to InstantiationNamedArguments\Foo constructor. ' ,
@@ -501,6 +504,10 @@ public function testBug10248(): void
501
504
502
505
public function testBug11815 (): void
503
506
{
507
+ if (PHP_VERSION_ID < 80000 ) {
508
+ $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
509
+ }
510
+
504
511
$ this ->analyse ([__DIR__ . '/data/bug-11815.php ' ], []);
505
512
}
506
513
0 commit comments