mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Refactor the method call analyzer a little
This commit is contained in:
parent
cfcb65aaac
commit
a49b5af3e9
File diff suppressed because it is too large
Load Diff
@ -932,7 +932,7 @@ class CallAnalyzer
|
||||
if (IssueBuffer::accepts(
|
||||
new InvalidPassByReference(
|
||||
'Parameter ' . ($argument_offset + 1) . ' of ' . $method_id . ' expects a variable',
|
||||
$code_location
|
||||
new CodeLocation($statements_analyzer->getSource(), $arg->value)
|
||||
),
|
||||
$statements_analyzer->getSuppressedIssues()
|
||||
)) {
|
||||
@ -1103,7 +1103,7 @@ class CallAnalyzer
|
||||
new MixedArgument(
|
||||
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id
|
||||
. ' cannot be mixed, expecting array',
|
||||
$code_location
|
||||
new CodeLocation($statements_analyzer->getSource(), $arg->value)
|
||||
),
|
||||
$statements_analyzer->getSuppressedIssues()
|
||||
)) {
|
||||
@ -1116,7 +1116,7 @@ class CallAnalyzer
|
||||
new InvalidArgument(
|
||||
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id
|
||||
. ' expects array, ' . $atomic_type->getId() . ' provided',
|
||||
$code_location
|
||||
new CodeLocation($statements_analyzer->getSource(), $arg->value)
|
||||
),
|
||||
$statements_analyzer->getSuppressedIssues()
|
||||
)) {
|
||||
|
@ -139,7 +139,7 @@ class FileReferenceTest extends TestCase
|
||||
|
||||
(new A())->foo();',
|
||||
'A::foo',
|
||||
['6:21:(new A())->foo()'],
|
||||
['6:32:foo'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user