Skip to content

Commit

Permalink
shepherd
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Mar 13, 2024
1 parent 248defb commit c6b2d50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Psalm/Internal/Analyzer/ClassAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,10 @@ public static function addContextProperties(
if (!$property_type->isMixed()
&& (!$property_storage->is_promoted
|| (strtolower($fq_class_name) !== strtolower($property_class_name)
&& strtolower(
$storage->declaring_method_ids['__construct']->fq_class_name,
) === strtolower($fq_class_name)))
&& isset($storage->declaring_method_ids['__construct'])
&& strtolower(
$storage->declaring_method_ids['__construct']->fq_class_name,
) === strtolower($fq_class_name)))
&& !$property_storage->has_default
&& !($property_type->isNullable() && $property_type->from_docblock)
) {
Expand All @@ -888,6 +889,7 @@ public static function addContextProperties(
if (!$property_storage->has_default
&& (!$property_storage->is_promoted
|| (strtolower($fq_class_name) !== strtolower($property_class_name)
&& isset($storage->declaring_method_ids['__construct'])
&& strtolower(
$storage->declaring_method_ids['__construct']->fq_class_name,
) === strtolower($fq_class_name)))) {
Expand Down

0 comments on commit c6b2d50

Please sign in to comment.