diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 39e01182c..eed99a123 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,14 +1,14 @@ - + - $comment_block->tags['variablesfrom'][0] + tags['variablesfrom'][0]]]> $matches[1] - $comment_block->tags['variablesfrom'][0] + tags['variablesfrom'][0]]]> $matches[1] @@ -24,7 +24,7 @@ - explode('::', $method_id)[1] + @@ -38,7 +38,7 @@ $comments[0] $property_name - $stmt->props[0] + props[0]]]> $uninitialized_variables[0] @@ -58,7 +58,7 @@ - $stmt->cond + cond]]> @@ -69,46 +69,46 @@ - $context->assigned_var_ids += $switch_scope->new_assigned_var_ids + assigned_var_ids += $switch_scope->new_assigned_var_ids]]> - $new_case_equality_expr->getArgs()[1] - $switch_scope->leftover_statements[0] - $traverser->traverse([$switch_condition])[0] + getArgs()[1]]]> + leftover_statements[0]]]> + traverse([$switch_condition])[0]]]> - $assertion->rule[0] - $assertion->rule[0] - $assertion->rule[0] - $assertion->rule[0] - $assertion->rule[0] - $assertion->rule[0] - $assertion->rule[0] - $count_expr->getArgs()[0] - $count_expr->getArgs()[0] - $count_expr->getArgs()[0] - $count_expr->getArgs()[0] - $count_expr->getArgs()[0] - $counted_expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[0] - $expr->getArgs()[1] - $expr->getArgs()[1] - $get_debug_type_expr->getArgs()[0] - $get_debug_type_expr->getArgs()[0] - $getclass_expr->getArgs()[0] - $gettype_expr->getArgs()[0] - $gettype_expr->getArgs()[0] + rule[0]]]> + rule[0]]]> + rule[0]]]> + rule[0]]]> + rule[0]]]> + rule[0]]]> + rule[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[1]]]> + getArgs()[1]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> + getArgs()[0]]]> @@ -129,7 +129,7 @@ $method_name $parts[1] - explode('::', $cased_method_id)[1] + @@ -143,7 +143,7 @@ - $stmt->getArgs()[0] + getArgs()[0]]]> $parts[1] @@ -156,12 +156,12 @@ - $result->invalid_method_call_types[0] - $result->non_existent_class_method_ids[0] - $result->non_existent_class_method_ids[0] - $result->non_existent_interface_method_ids[0] - $result->non_existent_interface_method_ids[0] - $result->non_existent_magic_method_ids[0] + invalid_method_call_types[0]]]> + non_existent_class_method_ids[0]]]> + non_existent_class_method_ids[0]]]> + non_existent_interface_method_ids[0]]]> + non_existent_interface_method_ids[0]]]> + non_existent_magic_method_ids[0]]]> @@ -171,8 +171,8 @@ - $callable_arg->items[0] - $callable_arg->items[1] + items[0]]]> + items[1]]]> @@ -205,7 +205,7 @@ - $atomic_return_type->type_params[2] + type_params[2]]]> @@ -225,7 +225,7 @@ - $stmt->expr->getArgs()[0] + expr->getArgs()[0]]]> $check_type_string @@ -233,7 +233,7 @@ - $options['tcp'] ?? null + @@ -283,11 +283,11 @@ - $a->props[0] - $a->stmts[0] + props[0]]]> + stmts[0]]]> $a_stmt_comments[0] - $b->props[0] - $b->stmts[0] + props[0]]]> + stmts[0]]]> $b_stmt_comments[0] @@ -304,14 +304,14 @@ - $stmt->props[0] + props[0]]]> - $type < 1 - $type < 1 || $type > 4 - $type > 4 + + 4]]> + 4]]> @@ -347,7 +347,7 @@ $match[0] $match[1] $match[2] - $node->stmts[0] + stmts[0]]]> $replacement_stmts[0] $replacement_stmts[0] $replacement_stmts[0] @@ -357,8 +357,8 @@ $doc_line_parts[1] $matches[0] - $method_tree->children[0] - $method_tree->children[1] + children[0]]]> + children[1]]]> @@ -369,8 +369,8 @@ - $node->getArgs()[0] - $node->getArgs()[1] + getArgs()[0]]]> + getArgs()[1]]]> @@ -378,7 +378,7 @@ $since_parts[1] - count($line_parts) > 0 + 0]]> @@ -391,7 +391,7 @@ - $stmt->stmts[0] + stmts[0]]]> @@ -419,8 +419,8 @@ isContainedBy - $array->properties[0] - $array->properties[0] + properties[0]]]> + properties[0]]]> @@ -433,7 +433,7 @@ - $array_atomic_type->properties[0] + properties[0]]]> $properties[0] $properties[0] $properties[0] @@ -447,13 +447,13 @@ - $combination->array_type_params[1] - $combination->array_type_params[1] - $combination->array_type_params[1] - $combination->array_type_params[1] - $combination->array_type_params[1] - $combination->array_type_params[1] - $combination->array_type_params[1] + array_type_params[1]]]> + array_type_params[1]]]> + array_type_params[1]]]> + array_type_params[1]]]> + array_type_params[1]]]> + array_type_params[1]]]> + array_type_params[1]]]> @@ -466,8 +466,8 @@ $const_name $const_name $intersection_types[0] - $parse_tree->children[0] - $parse_tree->condition->children[0] + children[0]]]> + condition->children[0]]]> array_keys($offset_template_data)[0] array_keys($template_type_map[$array_param_name])[0] array_keys($template_type_map[$class_name])[0] @@ -485,7 +485,7 @@ - $codebase->config->shepherd_host + config->shepherd_host]]> @@ -543,7 +543,7 @@ replace - $this->type_params[1] + type_params[1]]]> @@ -569,7 +569,7 @@ replace - $cloned->value_param + value_param]]> @@ -585,8 +585,8 @@ TList - new TList($this->getGenericValueType()) - new TNonEmptyList($this->getGenericValueType()) + getGenericValueType())]]> + getGenericValueType())]]> combine @@ -604,12 +604,12 @@ replace - $key_type->possibly_undefined + possibly_undefined]]> - $this->properties[0] - $this->properties[0] - $this->properties[0] + properties[0]]]> + properties[0]]]> + properties[0]]]> getList @@ -621,7 +621,7 @@ replace - $cloned->type_param + type_param]]> @@ -697,7 +697,7 @@ TArray|TKeyedArray|TClassStringMap - $this->types['array'] + types['array']]]> allFloatLiterals @@ -708,7 +708,7 @@ - $subNodes['expr'] + diff --git a/src/Psalm/ErrorBaseline.php b/src/Psalm/ErrorBaseline.php index 1206a518c..135a2a984 100644 --- a/src/Psalm/ErrorBaseline.php +++ b/src/Psalm/ErrorBaseline.php @@ -266,7 +266,12 @@ final class ErrorBaseline foreach ($existingIssueType['s'] as $selection) { $codeNode = $baselineDoc->createElement('code'); - $codeNode->textContent = trim($selection); + $textContent = trim($selection); + if ($textContent !== \htmlspecialchars($textContent)) { + $codeNode->append($baselineDoc->createCDATASection($textContent)); + } else { + $codeNode->textContent = trim($textContent); + } $issueNode->appendChild($codeNode); } $fileNode->appendChild($issueNode);