Skip to content

Commit f70f071

Browse files
committed
function scope
1 parent b922040 commit f70f071

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionRule.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public function getNodeType(): string
2323
public function processNode(Node $node, Scope $scope): array
2424
{
2525
if ($scope->getFunction() !== null) {
26-
throw new ShouldNotHappenException('All names in the tests should not have a scope function.');
26+
throw new ShouldNotHappenException('All names in the tests should not have a function scope.');
2727
}
2828

2929
return [
30-
RuleErrorBuilder::message(sprintf('Name %s found in scope-function null', $node->toString()))->identifier('test.instanceOfMethodsParameterRule')->build(),
30+
RuleErrorBuilder::message(sprintf('Name %s found in function scope null', $node->toString()))->identifier('test.instanceOfMethodsParameterRule')->build(),
3131
];
3232
}
3333

Diff for: tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public function testRule(): void
3030

3131
$this->analyse([__DIR__ . '/data/instance-methods-parameter-scope.php'], [
3232
[
33-
'Name DateTime found in scope-function null',
33+
'Name DateTime found in function scope null',
3434
12,
3535
],
3636
[
37-
'Name Baz\Waldo found in scope-function null',
37+
'Name Baz\Waldo found in function scope null',
3838
16,
3939
],
4040
]);

0 commit comments

Comments
 (0)