1
0
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:
Brown 2019-04-09 15:06:10 -04:00
parent 3dc3d659f1
commit 808522c36f
3 changed files with 9 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}
}
}

View File

@ -316,6 +316,10 @@ class MethodCallTest extends TestCase
);
}'
],
'soapFaultConstruct' => [
'<?php
new SoapFault("1", "faultstring", "faultactor");'
],
];
}