Skip to content

Commit

Permalink
Invert meaning of dupe_key
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Feb 7, 2022
1 parent 3a298d0 commit 4c54f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion psalm-baseline.xml
Expand Up @@ -353,8 +353,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">
Expand Down
4 changes: 2 additions & 2 deletions src/Psalm/IssueBuffer.php
Expand Up @@ -293,7 +293,7 @@ public static function add(CodeIssue $e, bool $is_fixable = false): bool
. $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)) {
Expand Down Expand Up @@ -518,7 +518,7 @@ public static function addIssues(array $issues_data): void
. '-' . $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;
Expand Down

0 comments on commit 4c54f2b

Please sign in to comment.