Skip to content

Commit

Permalink
Replace array cast with get_object_vars() which Psalm understands
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Jul 20, 2021
1 parent 39555a2 commit b149097
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Report/XmlReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Psalm\Report;

use function array_map;
use function get_object_vars;

class XmlReport extends Report
{
Expand All @@ -17,7 +18,7 @@ public function create(): string
[
'item' => array_map(
function (IssueData $issue_data): array {
$issue_data = (array) $issue_data;
$issue_data = get_object_vars($issue_data);
unset($issue_data['dupe_key']);

if (null !== $issue_data['taint_trace']) {
Expand Down

0 comments on commit b149097

Please sign in to comment.