Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix code where the offset was wrong #7463

Merged
merged 1 commit into from Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Psalm/Internal/Codebase/Properties.php
Expand Up @@ -327,12 +327,12 @@ public function getPropertyType(

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

Expand Down
3 changes: 2 additions & 1 deletion src/Psalm/Internal/Codebase/Reflection.php
Expand Up @@ -3,6 +3,7 @@
namespace Psalm\Internal\Codebase;

use Exception;
use LibXMLError;
use LogicException;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
Expand Down Expand Up @@ -64,7 +65,7 @@ public function registerClass(ReflectionClass $reflected_class): void
{
$class_name = $reflected_class->name;

if ($class_name === 'LibXMLError') {
if ($class_name === LibXMLError::class) {
$class_name = 'libXMLError';
}

Expand Down