Code Duplication    Length = 5-5 lines in 2 locations

Serializer/Normalizer/FlattenExceptionHandler.php 1 location

@@ 103-107 (lines=5) @@
100
101
        $showMessage = $this->messagesMap->resolveFromClassName($exception->getClass());
102
103
        if ($showMessage || $this->debug) {
104
            $message = $exception->getMessage();
105
        } else {
106
            $message = Response::$statusTexts[$statusCode] ?? 'error';
107
        }
108
109
        if ($this->rfc7807) {
110
            return [

Serializer/Normalizer/FlattenExceptionNormalizer.php 1 location

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