Code Duplication    Length = 6-6 lines in 3 locations

src/Interceptor/LogExceptionsInterceptor.php 1 location

@@ 55-60 (lines=6) @@
52
                /** Monolog\Logger */
53
                $logFormat['context']['code'] = $exception->getCode();
54
                $logFormat['context']['error_message'] = $exception->getMessage();
55
                if ($logger instanceof LogManager) {
56
                    if (!is_null($annotation->driver)) {
57
                        $logger = $logger->driver($annotation->driver);
58
                    }
59
                    $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
60
                }
61
            }
62
            throw $exception;
63
        }

src/Interceptor/LoggableInterceptor.php 1 location

@@ 58-63 (lines=6) @@
55
        }
56
        $logFormat['context']['time'] = $time;
57
        /** Monolog\Logger */
58
        if ($logger instanceof LogManager) {
59
            if (!is_null($annotation->driver)) {
60
                $logger = $logger->driver($annotation->driver);
61
            }
62
            $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
63
        }
64
65
        return $result;
66
    }

src/Interceptor/QueryLogInterceptor.php 1 location

@@ 60-65 (lines=6) @@
57
        $result = $invocation->proceed();
58
        $logFormat = $this->queryLogFormatter($annotation, $invocation);
59
        $logger = static::$logger;
60
        if ($logger instanceof LogManager) {
61
            if (!is_null($annotation->driver)) {
62
                $logger = $logger->driver($annotation->driver);
63
            }
64
            $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
65
        }
66
        $this->queryLogs = [];
67
68
        return $result;