Skip to content

Commit a8146c8

Browse files
committed
Use current PHP version in CallToFunctionParametersRuleTest
1 parent c586014 commit a8146c8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function getRule(): Rule
2828
$broker = $this->createReflectionProvider();
2929
return new CallToFunctionParametersRule(
3030
$broker,
31-
new FunctionCallParametersCheck(new RuleLevelHelper($broker, true, false, true, $this->checkExplicitMixed, $this->checkImplicitMixed, true, false), new NullsafeCheck(), new PhpVersion(80000), new UnresolvableTypeHelper(), new PropertyReflectionFinder(), true, true, true, true, true),
31+
new FunctionCallParametersCheck(new RuleLevelHelper($broker, true, false, true, $this->checkExplicitMixed, $this->checkImplicitMixed, true, false), new NullsafeCheck(), new PhpVersion(PHP_VERSION_ID), new UnresolvableTypeHelper(), new PropertyReflectionFinder(), true, true, true, true, true),
3232
);
3333
}
3434

@@ -481,6 +481,10 @@ public function testGenericFunction(): void
481481

482482
public function testNamedArguments(): void
483483
{
484+
if (PHP_VERSION_ID < 80000) {
485+
$this->markTestSkipped('Test requires PHP 8.0');
486+
}
487+
484488
$errors = [
485489
[
486490
'Missing parameter $j (int) in call to function FunctionNamedArguments\foo.',
@@ -495,12 +499,6 @@ public function testNamedArguments(): void
495499
14,
496500
],
497501
];
498-
if (PHP_VERSION_ID < 80000) {
499-
$errors[] = [
500-
'Missing parameter $arr1 (array) in call to function array_merge.',
501-
14,
502-
];
503-
}
504502

505503
require_once __DIR__ . '/data/named-arguments-define.php';
506504
$this->analyse([__DIR__ . '/data/named-arguments.php'], $errors);

0 commit comments

Comments
 (0)