mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Merge pull request #7475 from zoonru/methodsignaturemismatch_dupe
Invert meaning of dupe_key
This commit is contained in:
commit
cab6f33cb2
@ -361,8 +361,9 @@
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="src/Psalm/Type/Reconciler.php">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||
<code>$type[0]</code>
|
||||
<code>$type[0][0]</code>
|
||||
</PossiblyUndefinedIntArrayOffset>
|
||||
</file>
|
||||
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php">
|
||||
|
@ -68,7 +68,7 @@ class AlgebraAnalyzer
|
||||
new RedundantCondition(
|
||||
$formula_2_clause . ' has already been asserted',
|
||||
new CodeLocation($statements_analyzer, $stmt),
|
||||
null
|
||||
'already asserted ' . $formula_2_clause
|
||||
),
|
||||
$statements_analyzer->getSuppressedIssues()
|
||||
);
|
||||
|
@ -3124,7 +3124,7 @@ class AssertionFinder
|
||||
new DocblockTypeContradiction(
|
||||
$var_type . ' does not contain an empty array',
|
||||
new CodeLocation($source, $conditional),
|
||||
null
|
||||
$var_type . ' !== []'
|
||||
),
|
||||
$source->getSuppressedIssues()
|
||||
);
|
||||
@ -3133,7 +3133,7 @@ class AssertionFinder
|
||||
new TypeDoesNotContainType(
|
||||
$var_type . ' does not contain empty array',
|
||||
new CodeLocation($source, $conditional),
|
||||
null
|
||||
$var_type . ' !== []'
|
||||
),
|
||||
$source->getSuppressedIssues()
|
||||
);
|
||||
|
@ -292,7 +292,7 @@ class BinaryOpAnalyzer
|
||||
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 @@ class BinaryOpAnalyzer
|
||||
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 @@ class BinaryOpAnalyzer
|
||||
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 @@ class BinaryOpAnalyzer
|
||||
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()
|
||||
);
|
||||
|
@ -408,8 +408,6 @@ class TextDocument
|
||||
* https://github.com/felixfbecker/php-language-server-protocol
|
||||
* See:
|
||||
* https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#workspaceEdit
|
||||
*
|
||||
* @psalm-suppress InvalidArgument
|
||||
*/
|
||||
$edit = new WorkspaceEdit([
|
||||
$textDocument->uri => [
|
||||
|
@ -1526,7 +1526,7 @@ class AssertionReconciler extends Reconciler
|
||||
new TypeDoesNotContainType(
|
||||
'Cannot allow string comparison to object for ' . $key,
|
||||
$code_location,
|
||||
null
|
||||
"no string comparison to $key"
|
||||
),
|
||||
$suppressed_issues
|
||||
);
|
||||
|
@ -125,7 +125,7 @@ class SimpleNegatedAssertionReconciler extends Reconciler
|
||||
'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 @@ class SimpleNegatedAssertionReconciler extends Reconciler
|
||||
'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
|
||||
);
|
||||
|
@ -293,7 +293,7 @@ final class IssueBuffer
|
||||
. $trace_var
|
||||
. '-' . $e->getShortLocation()
|
||||
. ':' . $e->code_location->getColumn()
|
||||
. ' ' . $e->dupe_key;
|
||||
. ' ' . ($e->dupe_key ?? $e->message);
|
||||
|
||||
if ($reporting_level === Config::REPORT_INFO) {
|
||||
if ($is_tainted || !self::alreadyEmitted($emitted_key)) {
|
||||
@ -518,7 +518,7 @@ final class IssueBuffer
|
||||
. '-' . $issue->file_name
|
||||
. ':' . $issue->line_from
|
||||
. ':' . $issue->column_from
|
||||
. ' ' . $issue->dupe_key;
|
||||
. ' ' . ($issue->dupe_key ?? $issue->message);
|
||||
|
||||
if (!self::alreadyEmitted($emitted_key)) {
|
||||
self::$issues_data[$file_path][] = $issue;
|
||||
|
Loading…
Reference in New Issue
Block a user