mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix #1504 and ignore SoapClient errors
This commit is contained in:
parent
783f028f70
commit
691d71cdb4
@ -857,6 +857,7 @@ class MethodAnalyzer extends FunctionLikeAnalyzer
|
||||
&& $guide_param->type
|
||||
&& !$guide_param->type->hasMixed()
|
||||
&& !$guide_param->type->from_docblock
|
||||
&& ($cased_guide_method_id !== 'SoapClient::__soapCall' || $implemeneter_param_type)
|
||||
&& (
|
||||
!$implemeneter_param_type
|
||||
|| (
|
||||
@ -872,7 +873,7 @@ class MethodAnalyzer extends FunctionLikeAnalyzer
|
||||
if (IssueBuffer::accepts(
|
||||
new MethodSignatureMismatch(
|
||||
'Argument ' . ($i + 1) . ' of ' . $cased_implementer_method_id . ' has wrong type \'' .
|
||||
$implementer_method_storage->params[$i]->type . '\', expecting \'' .
|
||||
$implemeneter_param_type . '\', expecting \'' .
|
||||
$guide_param->type . '\' as defined by ' .
|
||||
$cased_guide_method_id,
|
||||
$implementer_method_storage->params[$i]->location
|
||||
|
@ -41,6 +41,32 @@ class MethodSignatureTest extends TestCase
|
||||
) {
|
||||
return $_GET["foo"];
|
||||
}
|
||||
}
|
||||
|
||||
class B extends SoapClient
|
||||
{
|
||||
public function __soapCall(
|
||||
$function_name,
|
||||
$arguments,
|
||||
$options = [],
|
||||
$input_headers = [],
|
||||
&$output_headers = []
|
||||
) {
|
||||
return $_GET["foo"];
|
||||
}
|
||||
}
|
||||
|
||||
class C extends SoapClient
|
||||
{
|
||||
public function __soapCall(
|
||||
string $function_name,
|
||||
$arguments,
|
||||
$options = [],
|
||||
$input_headers = [],
|
||||
&$output_headers = []
|
||||
) {
|
||||
return $_GET["foo"];
|
||||
}
|
||||
}'
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user