Skip to content

Commit

Permalink
Improve messages
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 25, 2021
1 parent 4f5c205 commit cd53e04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/Psalm/Internal/Type/NegatedAssertionReconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public static function reconcile(
if ($existing_var_type->from_static_property) {
if (IssueBuffer::accepts(
new RedundantPropertyInitializationCheck(
'Static property type ' . $key . ' with type '
. $existing_var_type . ' has unexpected isset check — should it be nullable?',
'Static property ' . $key . ' with type '
. $existing_var_type
. ' has unexpected isset check — should it be nullable?',
$code_location
),
$suppressed_issues
Expand All @@ -104,7 +105,7 @@ public static function reconcile(
} elseif ($existing_var_type->from_property) {
if (IssueBuffer::accepts(
new RedundantPropertyInitializationCheck(
'Property type ' . $key . ' with type '
'Property ' . $key . ' with type '
. $existing_var_type . ' should already be set in the constructor',
$code_location
),
Expand Down
7 changes: 4 additions & 3 deletions src/Psalm/Type/Reconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,9 @@ protected static function triggerIssueForImpossible(
if ($existing_var_type->from_static_property) {
if (IssueBuffer::accepts(
new RedundantPropertyInitializationCheck(
'Static property type ' . $key . ' with type '
. $old_var_type_string . ' has unexpected isset check — should it be nullable?',
'Static property ' . $key . ' with type '
. $old_var_type_string
. ' has unexpected isset check — should it be nullable?',
$code_location
),
$suppressed_issues
Expand All @@ -905,7 +906,7 @@ protected static function triggerIssueForImpossible(
} else {
if (IssueBuffer::accepts(
new RedundantPropertyInitializationCheck(
'Property type ' . $key . ' with type '
'Property ' . $key . ' with type '
. $old_var_type_string . ' should already be set in the constructor',
$code_location
),
Expand Down

0 comments on commit cd53e04

Please sign in to comment.