1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Replace array cast with get_object_vars() which Psalm understands

This commit is contained in:
Bruce Weirdan 2021-07-20 23:26:15 +03:00
parent 39555a2df8
commit b149097086
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -7,6 +7,7 @@ use Psalm\Internal\Analyzer\IssueData;
use Psalm\Report;
use function array_map;
use function get_object_vars;
class XmlReport extends Report
{
@ -17,7 +18,7 @@ class XmlReport extends Report
[
'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']) {