Code Duplication    Length = 20-20 lines in 2 locations

src/Exceptions/Handler.php 1 location

@@ 89-108 (lines=20) @@
86
     * @param \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response $response
87
     * @return bool
88
     */
89
    protected function shouldRenderException($response)
90
    {
91
        if ($response instanceof RedirectResponse) {
92
            return false;
93
        }
94
95
        if ($response instanceof JsonResponse) {
96
            return false;
97
        }
98
99
        if ($response->getContent() instanceof View) {
100
            return false;
101
        }
102
103
        if ($response instanceof Response && $response->getOriginalContent() instanceof View) {
104
            return false;
105
        }
106
107
        return true;
108
    }
109
}
110

src/Exceptions/LoggerHandler.php 1 location

@@ 85-104 (lines=20) @@
82
     * @param \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response $response
83
     * @return bool
84
     */
85
    protected function shouldRenderException($response)
86
    {
87
        if ($response instanceof RedirectResponse) {
88
            return false;
89
        }
90
91
        if ($response instanceof JsonResponse) {
92
            return false;
93
        }
94
95
        if ($response->getContent() instanceof View) {
96
            return false;
97
        }
98
99
        if ($response instanceof Response && $response->getOriginalContent() instanceof View) {
100
            return false;
101
        }
102
103
        return true;
104
    }
105
}
106