diff --git a/src/Psalm/Type/Reconciler.php b/src/Psalm/Type/Reconciler.php index 1b65fdbbf..f21b96530 100644 --- a/src/Psalm/Type/Reconciler.php +++ b/src/Psalm/Type/Reconciler.php @@ -816,8 +816,6 @@ class Reconciler ): void { $not = $assertion[0] === '!'; - $safe_assertion = $assertion; - if ($not) { $assertion = substr($assertion, 1); } @@ -841,7 +839,7 @@ class Reconciler . ' for ' . $key . ' is ' . ($not ? 'never ' : 'always ') . $assertion, $code_location, - $old_var_type_string . ' ' . $safe_assertion + $old_var_type_string . ' ' . $assertion ), $suppressed_issues )) { @@ -854,7 +852,7 @@ class Reconciler . ' for ' . $key . ' is ' . ($not ? 'never ' : 'always ') . $assertion, $code_location, - $old_var_type_string . ' ' . $safe_assertion + $old_var_type_string . ' ' . $assertion ), $suppressed_issues )) { @@ -869,7 +867,7 @@ class Reconciler . ' for ' . $key . ' is ' . ($not ? 'always ' : 'never ') . $assertion, $code_location, - $old_var_type_string . ' ' . $safe_assertion + $old_var_type_string . ' ' . $assertion ), $suppressed_issues )) { @@ -882,7 +880,7 @@ class Reconciler . ' for ' . $key . ' is never ' . $assertion, $code_location, - $old_var_type_string . ' ' . $safe_assertion + $old_var_type_string . ' ' . $assertion ); } else { $issue = new TypeDoesNotContainType( @@ -890,7 +888,7 @@ class Reconciler . ' for ' . $key . ' is ' . ($not ? 'always ' : 'never ') . $assertion, $code_location, - $old_var_type_string . ' ' . $safe_assertion + $old_var_type_string . ' ' . $assertion ); }