1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

fix code where the offset was wrong

This commit is contained in:
orklah 2022-01-22 21:09:37 +01:00
parent 4ed8355eed
commit b9655457da
2 changed files with 6 additions and 5 deletions

View File

@ -327,12 +327,12 @@ class Properties
if ($storage->type) {
if ($property_set) {
if (isset($class_storage->pseudo_property_set_types[$property_name])) {
return $class_storage->pseudo_property_set_types[$property_name];
if (isset($class_storage->pseudo_property_set_types['$'.$property_name])) {
return $class_storage->pseudo_property_set_types['$'.$property_name];
}
} else {
if (isset($class_storage->pseudo_property_get_types[$property_name])) {
return $class_storage->pseudo_property_get_types[$property_name];
if (isset($class_storage->pseudo_property_get_types['$'.$property_name])) {
return $class_storage->pseudo_property_get_types['$'.$property_name];
}
}

View File

@ -3,6 +3,7 @@
namespace Psalm\Internal\Codebase;
use Exception;
use LibXMLError;
use LogicException;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
@ -64,7 +65,7 @@ class Reflection
{
$class_name = $reflected_class->name;
if ($class_name === 'LibXMLError') {
if ($class_name === LibXMLError::class) {
$class_name = 'libXMLError';
}