Code Duplication    Length = 5-5 lines in 2 locations

Serializer/Normalizer/FlattenExceptionHandler.php 1 location

@@ 89-93 (lines=5) @@
86
87
        $showMessage = $this->messagesMap->resolveFromClassName($exception->getClass());
88
89
        if ($showMessage || $this->debug) {
90
            $message = $exception->getMessage();
91
        } else {
92
            $message = Response::$statusTexts[$statusCode] ?? 'error';
93
        }
94
95
        if ($this->rfc7807) {
96
            return [

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 [