Code Duplication    Length = 5-5 lines in 2 locations

Serializer/Normalizer/FlattenExceptionNormalizer.php 1 location

@@ 48-52 (lines=5) @@
45
46
        $showMessage = $this->messagesMap->resolveFromClassName($exception->getClass());
47
48
        if ($showMessage || $this->debug) {
49
            $message = $exception->getMessage();
50
        } else {
51
            $message = Response::$statusTexts[$statusCode] ?? 'error';
52
        }
53
54
        if ($this->rfc7807) {
55
            return [

Serializer/Normalizer/FlattenExceptionHandler.php 1 location

@@ 95-99 (lines=5) @@
92
93
        $showMessage = $this->messagesMap->resolveFromClassName($exception->getClass());
94
95
        if ($showMessage || $this->debug) {
96
            $message = $exception->getMessage();
97
        } else {
98
            $message = Response::$statusTexts[$statusCode] ?? 'error';
99
        }
100
101
        if ($this->rfc7807) {
102
            return [