mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix #4297 - use correct property id for each different MissingConstructor error
This commit is contained in:
parent
49dcec6d4a
commit
5c1fcf403c
@ -1457,11 +1457,11 @@ class ClassAnalyzer extends ClassLikeAnalyzer
|
||||
}
|
||||
|
||||
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]
|
||||
|
Loading…
Reference in New Issue
Block a user