mirror of
https://github.com/Dannecron/coverage-merger.git
synced 2025-12-26 00:02:35 +03:00
internal: fix phpstan errors
This commit is contained in:
@@ -14,6 +14,9 @@ class ClassDto
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function getProperties(): array
|
||||
{
|
||||
return $this->properties;
|
||||
|
||||
@@ -22,6 +22,9 @@ class LineDto
|
||||
return $this->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function getProperties(): array
|
||||
{
|
||||
return $this->properties;
|
||||
|
||||
@@ -57,6 +57,10 @@ class Parser implements ElementsDictionary
|
||||
return new LineDto($properties, (int) $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \SimpleXMLElement $xml
|
||||
* @return array<array-key, \SimpleXMLElement>
|
||||
*/
|
||||
public function getAttributes(\SimpleXMLElement $xml): array
|
||||
{
|
||||
return ((array) $xml->attributes())['@attributes'] ?? [];
|
||||
|
||||
@@ -14,7 +14,7 @@ class Renderer
|
||||
{
|
||||
/**
|
||||
* @param Accumulator $accumulator
|
||||
* @return array
|
||||
* @return array{0: string, 1: Metrics}
|
||||
* @throws \DOMException
|
||||
*/
|
||||
public function renderAccumulator(Accumulator $accumulator): array
|
||||
@@ -71,7 +71,7 @@ class Renderer
|
||||
|
||||
$xmlProject->appendChild($this->renderMetricsProject($xmlDocument, $projectMetrics));
|
||||
|
||||
return [$xmlDocument->saveXML(), $projectMetrics];
|
||||
return [(string) $xmlDocument->saveXML(), $projectMetrics];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,6 +56,11 @@ final class CloverMergeCommand extends CliCommand
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<array-key, string> $files
|
||||
* @param string $output
|
||||
* @param string|null $workdir
|
||||
* @param bool $stats
|
||||
* @return int
|
||||
* @throws ExecuteException
|
||||
*/
|
||||
public function execute(array $files, string $output, ?string $workdir, bool $stats): int
|
||||
|
||||
Reference in New Issue
Block a user