Skip to content

Commit

Permalink
Fix #4297 - use correct property id for each different MissingConstru…
Browse files Browse the repository at this point in the history
…ctor error
  • Loading branch information
muglug committed Oct 7, 2020
1 parent 1f2d276 commit 8b7657f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Internal/Analyzer/ClassAnalyzer.php
Expand Up @@ -1457,11 +1457,11 @@ function (FunctionLikeParameter $param) : PhpParser\Node\Arg {
}

if (!$storage->abstract && $uninitialized_typed_properties) {
foreach ($uninitialized_typed_properties as $uninitialized_property) {
foreach ($uninitialized_typed_properties as $id => $uninitialized_property) {
if ($uninitialized_property->location) {
if (IssueBuffer::accepts(
new MissingConstructor(
$class_storage->name . ' has an uninitialized property ' . $uninitialized_variables[0] .
$class_storage->name . ' has an uninitialized property ' . $id .
', but no constructor',
$uninitialized_property->location,
$class_storage->name . '::' . $uninitialized_variables[0]
Expand Down

0 comments on commit 8b7657f

Please sign in to comment.