From b69e22a33be8520bba9052d0bbabd5e6d525719c Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 14 Mar 2022 11:16:17 +0100 Subject: [PATCH] Add a few additional dupes --- src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php | 2 +- .../Analyzer/Statements/Expression/AssertionFinder.php | 4 ++-- .../Analyzer/Statements/Expression/BinaryOpAnalyzer.php | 8 ++++---- src/Psalm/Internal/Type/AssertionReconciler.php | 2 +- .../Internal/Type/SimpleNegatedAssertionReconciler.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php b/src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php index 813513decb4..7521d71f30d 100644 --- a/src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php @@ -68,7 +68,7 @@ public static function checkForParadox( new RedundantCondition( $formula_2_clause . ' has already been asserted', new CodeLocation($statements_analyzer, $stmt), - null + 'already asserted ' . $formula_2_clause ), $statements_analyzer->getSuppressedIssues() ); diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php b/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php index 5c3d8ec96ef..f5723f47918 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php @@ -3124,7 +3124,7 @@ private static function getEmptyArrayEqualityAssertions( new DocblockTypeContradiction( $var_type . ' does not contain an empty array', new CodeLocation($source, $conditional), - null + $var_type . ' !== []' ), $source->getSuppressedIssues() ); @@ -3133,7 +3133,7 @@ private static function getEmptyArrayEqualityAssertions( new TypeDoesNotContainType( $var_type . ' does not contain empty array', new CodeLocation($source, $conditional), - null + $var_type . ' !== []' ), $source->getSuppressedIssues() ); diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php index 5a4108c0127..667583344e9 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php @@ -292,7 +292,7 @@ public static function analyze( new DocblockTypeContradiction( $atomic_right_type . ' string length is not ' . $string_length, new CodeLocation($statements_analyzer, $stmt), - null + "strlen($atomic_right_type) !== $string_length" ), $statements_analyzer->getSuppressedIssues() ); @@ -301,7 +301,7 @@ public static function analyze( new TypeDoesNotContainType( $atomic_right_type . ' string length is not ' . $string_length, new CodeLocation($statements_analyzer, $stmt), - null + "strlen($atomic_right_type) !== $string_length" ), $statements_analyzer->getSuppressedIssues() ); @@ -312,7 +312,7 @@ public static function analyze( new RedundantConditionGivenDocblockType( $atomic_right_type . ' string length is never ' . $string_length, new CodeLocation($statements_analyzer, $stmt), - null + "strlen($atomic_right_type) !== $string_length" ), $statements_analyzer->getSuppressedIssues() ); @@ -321,7 +321,7 @@ public static function analyze( new RedundantCondition( $atomic_right_type . ' string length is never ' . $string_length, new CodeLocation($statements_analyzer, $stmt), - null + "strlen($atomic_right_type) !== $string_length" ), $statements_analyzer->getSuppressedIssues() ); diff --git a/src/Psalm/Internal/Type/AssertionReconciler.php b/src/Psalm/Internal/Type/AssertionReconciler.php index 7c9c53adccd..4e583f43365 100644 --- a/src/Psalm/Internal/Type/AssertionReconciler.php +++ b/src/Psalm/Internal/Type/AssertionReconciler.php @@ -1526,7 +1526,7 @@ private static function handleIsA( new TypeDoesNotContainType( 'Cannot allow string comparison to object for ' . $key, $code_location, - null + "no string comparison to $key" ), $suppressed_issues ); diff --git a/src/Psalm/Internal/Type/SimpleNegatedAssertionReconciler.php b/src/Psalm/Internal/Type/SimpleNegatedAssertionReconciler.php index 68b45b1f9b9..ff1b3dcdfad 100644 --- a/src/Psalm/Internal/Type/SimpleNegatedAssertionReconciler.php +++ b/src/Psalm/Internal/Type/SimpleNegatedAssertionReconciler.php @@ -125,7 +125,7 @@ public static function reconcile( 'Cannot resolve types for ' . $key . ' with docblock-defined type ' . $existing_var_type . ' and !isset assertion', $code_location, - null + 'cannot resolve !isset '.$existing_var_type. ' ' . $key ), $suppressed_issues ); @@ -135,7 +135,7 @@ public static function reconcile( 'Cannot resolve types for ' . $key . ' with type ' . $existing_var_type . ' and !isset assertion', $code_location, - null + 'cannot resolve !isset '.$existing_var_type. ' ' . $key ), $suppressed_issues );