Skip to content

Commit

Permalink
fix: #10080
Browse files Browse the repository at this point in the history
  • Loading branch information
ging-dev committed Sep 25, 2023
1 parent 7d8d74d commit e83a265
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Psalm/Internal/Diff/ClassStatementsDiffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,15 @@ static function (
/** @var PhpParser\Node */
$affected_elem = $diff_elem->type === DiffElem::TYPE_REMOVE ? $diff_elem->old : $diff_elem->new;
if ($affected_elem instanceof PhpParser\Node\Stmt\ClassMethod) {
$add_or_delete[] = $name_lc . '::' . strtolower((string) $affected_elem->name);
$name = strtolower((string) $affected_elem->name);
$add_or_delete[] = $name_lc . '::' . $name;
if ($name === '__construct') {
foreach ($affected_elem->params as $param) {
if ($param->flags) {
$add_or_delete[] = $name_lc . '::$' . $param->var->name;

Check failure on line 238 in src/Psalm/Internal/Diff/ClassStatementsDiffer.php

View workflow job for this annotation

GitHub Actions / build

UndefinedPropertyFetch

src/Psalm/Internal/Diff/ClassStatementsDiffer.php:238:71: UndefinedPropertyFetch: Instance property PhpParser\Node\Expr\Error::$name is not defined (see https://psalm.dev/039)

Check failure on line 238 in src/Psalm/Internal/Diff/ClassStatementsDiffer.php

View workflow job for this annotation

GitHub Actions / build

MixedOperand

src/Psalm/Internal/Diff/ClassStatementsDiffer.php:238:71: MixedOperand: Right operand cannot be mixed (see https://psalm.dev/059)
}
}
}
} elseif ($affected_elem instanceof PhpParser\Node\Stmt\Property) {
foreach ($affected_elem->props as $prop) {
$add_or_delete[] = $name_lc . '::$' . $prop->name;
Expand Down

0 comments on commit e83a265

Please sign in to comment.