Code Duplication    Length = 8-8 lines in 2 locations

src/RSlim.php 2 locations

@@ 86-93 (lines=8) @@
83
            };
84
        };
85
        if ($this->config['bypass_error_handlers'] === true) {
86
            $this->container['errorHandler'] = function($container) {
87
                return function($request, $response, $exception) use ($container) {
88
                    $response->getBody()->rewind();
89
                    return $response->withStatus(500)
90
                    ->withHeader('Content-Type', 'text/html')
91
                    ->write($exception->getMessage());
92
                };
93
            };
94
            $this->container['phpErrorHandler'] = function($container) {
95
                return function($request, $response, $error) use ($container) {
96
                    $response->getBody()->rewind();
@@ 94-101 (lines=8) @@
91
                    ->write($exception->getMessage());
92
                };
93
            };
94
            $this->container['phpErrorHandler'] = function($container) {
95
                return function($request, $response, $error) use ($container) {
96
                    $response->getBody()->rewind();
97
                    return $response->withStatus(500)
98
                    ->withHeader('Content-Type', 'text/html')
99
                    ->write($error->getMessage());
100
                };
101
            };
102
        }
103
        $this->app->run();
104
    }