feat: Remove unused event serialization
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -284,34 +284,4 @@ class SecurityEvent extends Event
|
||||
$this->severity = $severity;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSeverityLabel(): string
|
||||
{
|
||||
return match ($this->severity) {
|
||||
self::SEVERITY_DEBUG => 'DEBUG',
|
||||
self::SEVERITY_INFO => 'INFO',
|
||||
self::SEVERITY_WARNING => 'WARNING',
|
||||
self::SEVERITY_ERROR => 'ERROR',
|
||||
self::SEVERITY_CRITICAL => 'CRITICAL',
|
||||
default => 'UNKNOWN',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Override toArray to include security-specific fields
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return array_merge(parent::toArray(), [
|
||||
'ipAddress' => $this->ipAddress,
|
||||
'deviceFingerprint' => $this->deviceFingerprint,
|
||||
'userAgent' => $this->userAgent,
|
||||
'requestPath' => $this->requestPath,
|
||||
'requestMethod' => $this->requestMethod,
|
||||
'userId' => $this->userId,
|
||||
'reason' => $this->reason,
|
||||
'severity' => $this->severity,
|
||||
'severityLabel' => $this->getSeverityLabel(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user