Skip to content

Commit db119d6

Browse files
committed
Prevent dupe records
1 parent f9deaca commit db119d6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Psalm/Type/Reconciler.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,6 @@ protected static function triggerIssueForImpossible(
807807
): void {
808808
$not = $assertion[0] === '!';
809809

810-
$safe_assertion = $assertion;
811-
812810
if ($not) {
813811
$assertion = substr($assertion, 1);
814812
}
@@ -832,7 +830,7 @@ protected static function triggerIssueForImpossible(
832830
. ' for ' . $key
833831
. ' is ' . ($not ? 'never ' : 'always ') . $assertion,
834832
$code_location,
835-
$old_var_type_string . ' ' . $safe_assertion
833+
$old_var_type_string . ' ' . $assertion
836834
),
837835
$suppressed_issues
838836
)) {
@@ -845,7 +843,7 @@ protected static function triggerIssueForImpossible(
845843
. ' for ' . $key
846844
. ' is ' . ($not ? 'never ' : 'always ') . $assertion,
847845
$code_location,
848-
$old_var_type_string . ' ' . $safe_assertion
846+
$old_var_type_string . ' ' . $assertion
849847
),
850848
$suppressed_issues
851849
)) {
@@ -860,7 +858,7 @@ protected static function triggerIssueForImpossible(
860858
. ' for ' . $key
861859
. ' is ' . ($not ? 'always ' : 'never ') . $assertion,
862860
$code_location,
863-
$old_var_type_string . ' ' . $safe_assertion
861+
$old_var_type_string . ' ' . $assertion
864862
),
865863
$suppressed_issues
866864
)) {
@@ -873,15 +871,15 @@ protected static function triggerIssueForImpossible(
873871
. ' for ' . $key
874872
. ' is never ' . $assertion,
875873
$code_location,
876-
$old_var_type_string . ' ' . $safe_assertion
874+
$old_var_type_string . ' ' . $assertion
877875
);
878876
} else {
879877
$issue = new TypeDoesNotContainType(
880878
'Type ' . $old_var_type_string
881879
. ' for ' . $key
882880
. ' is ' . ($not ? 'always ' : 'never ') . $assertion,
883881
$code_location,
884-
$old_var_type_string . ' ' . $safe_assertion
882+
$old_var_type_string . ' ' . $assertion
885883
);
886884
}
887885

0 commit comments

Comments
 (0)