1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 02:47:02 +01:00
psalm/src/Psalm/Report/XmlReport.php
2020-02-20 22:48:29 -05:00

31 lines
608 B
PHP

<?php
namespace Psalm\Report;
use LSS\Array2XML;
use Psalm\Report;
use Psalm\Internal\Analyzer\IssueData;
use function array_map;
class XmlReport extends Report
{
/**
* {@inheritdoc}
*/
public function create(): string
{
$xml = Array2XML::createXML(
'report',
[
'item' => array_map(
function (IssueData $issue_data) {
return (array) $issue_data;
},
$this->issues_data
)
]
);
return $xml->saveXML();
}
}