Skip to content

Commit acd2279

Browse files
committed
Fix regression fetching violations when the list is empty
1 parent 5bb7f1e commit acd2279

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ClassMap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public function getMap(): array
5555
*/
5656
public function getPsrViolations(): array
5757
{
58+
if (\count($this->psrViolations) === 0) {
59+
return [];
60+
}
61+
5862
return array_map(static function (array $violation): string {
5963
return $violation['warning'];
6064
}, array_merge(...array_values($this->psrViolations)));

0 commit comments

Comments
 (0)