Skip to content

Commit

Permalink
Merge pull request #7463 from orklah/Properties
Browse files Browse the repository at this point in the history
fix code where the offset was wrong
  • Loading branch information
orklah committed Jan 22, 2022
2 parents c3ad520 + b965545 commit e0d3c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit e0d3c3f

Please sign in to comment.