Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"phpunit/phpunit": "^9.6.33",
"shipmonk/coding-standard": "^0.2.0",
"shipmonk/composer-dependency-analyser": "1.8.3",
"shipmonk/dead-code-detector": "^0.11.0",
"shipmonk/dead-code-detector": "^1.0",
"shipmonk/name-collision-detector": "2.1.1",
"shipmonk/phpstan-rules": "4.3.5"
},
Expand Down
7 changes: 1 addition & 6 deletions src/BaselineSplitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ public function split(string $loaderFilePath): array
/**
* @param list<array{message: string, count: int, path: string, identifier: string|null}|array{rawMessage: string, count: int, path: string, identifier: string|null}> $errors
* @return array<string, list<array{message: string, count: int, path: string}|array{rawMessage: string, count: int, path: string}>>
*
* @throws ErrorException
*/
private function groupErrorsByIdentifier(
array $errors,
Expand All @@ -122,15 +120,12 @@ private function groupErrorsByIdentifier(
'path' => $normalizedPath,
];

} elseif (isset($error['message'])) {
} else {
$groupedErrors[$identifier][] = [
'message' => $error['message'],
'count' => $error['count'],
'path' => $normalizedPath,
];

} else {
throw new ErrorException('Error is missing message or rawMessage');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Handler/PhpBaselineHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function encodeBaseline(
$message = $error['rawMessage'];
$messageKey = 'rawMessage';
} else {
$message = $error['message']; // @phpstan-ignore offsetAccess.notFound
$message = $error['message'];
$messageKey = 'message';
}

Expand Down
Loading