Code Duplication    Length = 16-16 lines in 2 locations

src/Slim/AdvancedErrorHandler.php 1 location

@@ 91-106 (lines=16) @@
88
    /**
89
     * @param \Exception $exception
90
     */
91
    private function logException(\Exception $exception)
92
    {
93
        if ($exception instanceof HttpException) {
94
            $this->logger->warning(
95
                'error-handler: {code} {message}',
96
                ['status' => $exception->getCode(), 'message' => $exception->getMessage()]
97
            );
98
99
            return;
100
        }
101
102
        $this->logger->error(
103
            'error-handler: {code} {message}',
104
            ['status' => 500, 'message' => $exception->getMessage()]
105
        );
106
    }
107
}
108

src/Slim/SimpleErrorHandler.php 1 location

@@ 52-67 (lines=16) @@
49
    /**
50
     * @param \Exception $exception
51
     */
52
    private function logException(\Exception $exception)
53
    {
54
        if ($exception instanceof HttpException) {
55
            $this->logger->warning(
56
                'error-handler: {code} {message}',
57
                ['status' => $exception->getCode(), 'message' => $exception->getMessage()]
58
            );
59
60
            return;
61
        }
62
63
        $this->logger->error(
64
            'error-handler: {code} {message}',
65
            ['status' => 500, 'message' => $exception->getMessage()]
66
        );
67
    }
68
}
69