mirror of
https://github.com/danog/psalm.git
synced 2024-12-15 02:47:02 +01:00
31 lines
608 B
PHP
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();
|
|
}
|
|
}
|