Code Duplication    Length = 14-14 lines in 2 locations

lib/Ajde/Exception/Handler.php 2 locations

@@ 217-230 (lines=14) @@
214
     *
215
     * @return string
216
     */
217
    public static function getExceptionChannelMap($exception)
218
    {
219
        if ($exception instanceof ErrorException) {
220
            return Ajde_Log::CHANNEL_ERROR;
221
        } elseif ($exception instanceof Ajde_Core_Exception_Routing) {
222
            return Ajde_Log::CHANNEL_ROUTING;
223
        } elseif ($exception instanceof Ajde_Core_Exception_Security) {
224
            return Ajde_Log::CHANNEL_SECURITY;
225
        } elseif ($exception instanceof Ajde_Exception) {
226
            return Ajde_Log::CHANNEL_APPLICATION;
227
        } else {
228
            return Ajde_Log::CHANNEL_EXCEPTION;
229
        }
230
    }
231
232
    /**
233
     * @param Throwable $exception
@@ 237-250 (lines=14) @@
234
     *
235
     * @return string
236
     */
237
    public static function getExceptionLevelMap($exception)
238
    {
239
        if ($exception instanceof ErrorException) {
240
            return Ajde_Log::LEVEL_ERROR;
241
        } elseif ($exception instanceof Ajde_Core_Exception_Routing) {
242
            return Ajde_Log::LEVEL_WARNING;
243
        } elseif ($exception instanceof Ajde_Core_Exception_Security) {
244
            return Ajde_Log::LEVEL_WARNING;
245
        } elseif ($exception instanceof Ajde_Exception) {
246
            return Ajde_Log::LEVEL_ERROR;
247
        } else {
248
            return Ajde_Log::LEVEL_ERROR;
249
        }
250
    }
251
252
    public static function getErrorType($type)
253
    {