From 7418e6e167bb2d0cfb1e0a37b37b36820e562693 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sun, 18 Jul 2021 16:52:00 +0300 Subject: [PATCH] grammar --- .../Assignment/InstancePropertyAssignmentAnalyzer.php | 2 +- .../Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php index 7beeed06b..3086993a0 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php @@ -1149,7 +1149,7 @@ class InstancePropertyAssignmentAnalyzer $context, new CodeLocation($statements_analyzer->getSource(), $stmt) ) - // when methods existance is asserted by a plugin it doesn't necessarily has storage + // when property existence is asserted by a plugin it doesn't necessarily has storage || ($codebase->properties->hasStorage($property_id) && $codebase->properties->getStorage($property_id)->is_static ) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php index 9588ceaf1..3b316619c 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php @@ -314,7 +314,7 @@ class AtomicPropertyFetchAnalyzer $property_id = $context->self . '::$' . $prop_name; } elseif (!$naive_property_exists || (!$is_static_access - // when methods existance is asserted by a plugin it doesn't necessarily has storage + // when property existence is asserted by a plugin it doesn't necessarily has storage && $codebase->properties->hasStorage($property_id) && $codebase->properties->getStorage($property_id)->is_static )