mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Add workaround SoapFault::__construct, fixing #1535
This commit is contained in:
parent
3dc3d659f1
commit
808522c36f
@ -930,8 +930,8 @@ class CallAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
if ($method_id && strpos($method_id, '::') && !$in_call_map) {
|
||||
$cased_method_id = $codebase->methods->getCasedMethodId($method_id);
|
||||
if ($method_id && strpos($method_id, '::')) {
|
||||
$codebase->methods->getCasedMethodId($method_id);
|
||||
} elseif ($function_storage) {
|
||||
$cased_method_id = $function_storage->cased_name;
|
||||
}
|
||||
|
@ -190,7 +190,9 @@ class Reflection
|
||||
|
||||
$this->extractReflectionMethodInfo($reflection_method);
|
||||
|
||||
if ($reflection_method->class !== $class_name) {
|
||||
if ($reflection_method->class !== $class_name
|
||||
&& ($class_name !== 'SoapFault' || $reflection_method->name !== '__construct')
|
||||
) {
|
||||
$this->codebase->methods->setDeclaringMethodId(
|
||||
$class_name . '::' . strtolower($reflection_method->name),
|
||||
$reflection_method->class . '::' . strtolower($reflection_method->name)
|
||||
@ -200,8 +202,6 @@ class Reflection
|
||||
$class_name . '::' . strtolower($reflection_method->name),
|
||||
$reflection_method->class . '::' . strtolower($reflection_method->name)
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,6 +316,10 @@ class MethodCallTest extends TestCase
|
||||
);
|
||||
}'
|
||||
],
|
||||
'soapFaultConstruct' => [
|
||||
'<?php
|
||||
new SoapFault("1", "faultstring", "faultactor");'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user