Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function getRule(): Rule
$broker = $this->createReflectionProvider();
return new CallToFunctionParametersRule(
$broker,
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),
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),
);
}

Expand Down Expand Up @@ -481,6 +481,10 @@ public function testGenericFunction(): void

public function testNamedArguments(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.0');
}

$errors = [
[
'Missing parameter $j (int) in call to function FunctionNamedArguments\foo.',
Expand All @@ -495,12 +499,6 @@ public function testNamedArguments(): void
14,
],
];
if (PHP_VERSION_ID < 80000) {
$errors[] = [
'Missing parameter $arr1 (array) in call to function array_merge.',
14,
];
}

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