diff --git a/src/ClassMap.php b/src/ClassMap.php index 1819208..886eb08 100644 --- a/src/ClassMap.php +++ b/src/ClassMap.php @@ -55,6 +55,10 @@ public function getMap(): array */ public function getPsrViolations(): array { + if (\count($this->psrViolations) === 0) { + return []; + } + return array_map(static function (array $violation): string { return $violation['warning']; }, array_merge(...array_values($this->psrViolations)));